jquery - flipdown, Up, panel - sample

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("#flipDown").click(function(){
        $("#panel").slideDown("slow");
    });
});

$(document).ready(function(){
    $("#flipUP").click(function(){
        $("#panel").slideUp("slow");
    });
});


</script>

<style>
#panel, #flipDown {
    padding: 5px;
    text-align: center;
    background-color: #e5eecc;
    border: solid 1px #c3c3c3;
}

#flipUP {
    padding: 5px;
    text-align: center;
    background-color: yellow;
    border: solid 1px #c3c3c3;
}


#panel {
    padding: 50px;
    display: none;
}
</style>
</head>
<body>

<div id="flipDown">Click to slide down panel</div>
<div id="panel">Hello world!</div>
<div id="flipUP">Click to slide UP panel</div>

</body>
</html>


Yorumlar