With jQuery, you can chain together actions/methods. Chaining allows us to run multiple jQuery methods (on the same element) within a single statement.
jQuery Method Chaining
Chaining allows us to run multiple jQuery commands, one after the other, on the same element(s). (This way, browsers do not have to find the same element(s) more than once.)
To chain an action, you simply append the action to the previous action.
$("#p1").css("color","red").slideUp(2000).slideDown(2000);