chains together the css(), slideUp(), and slideDown() methods. - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:css

Description

chains together the css(), slideUp(), and slideDown() methods.

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(){
    $("button").click(function(){
        $("#p1").css("color", "red")
            .slideUp(2000)/*from  w  w  w  .  j  a va 2 s.  co m*/
            .slideDown(2000);
    });
});
</script>
</head>
<body>

<p id="p1">jQuery is fun!!</p>

<button>Click me</button>

</body>
</html>

Related Tutorials