Chaining allows us to run multiple jQuery methods (on the same element) within a single statement.
With jQuery, you can chain together actions/methods.
Chaining allows us to run multiple jQuery methods (on the same element) within a single statement. 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.
Example
<div>Hello</div>
$("div")
.addClass("chain")
.css("color", "red")
.text("Hello world")
Result
<div class="chain" style="color: red">Hello world</div>