Slide down in 1 second - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:slideDown

Description

Slide down in 1 second

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $(".btn1").click(function(){
        $("p").slideUp(1000);
    });/* ww w.  java  2  s.c o m*/
    $(".btn2").click(function(){
        $("p").slideDown(1000);
    });
});
</script>
</head>
<body>

<p>This is a paragraph.</p>

<button class="btn1">Slide up</button>
<button class="btn2">Slide down</button>

</body>
</html>

Related Tutorials