What is chaining in jquery?

Chaining is technique that allows us to run multiple jQuery commands, one after the other, on the same element(s).
Following is the example of chainingWhat is chaining in jquery?What is chaining in jquery?

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("#d1").css("color", "red").slideUp(3000).slideDown(3000);
  });
});
</script>
</head>
<body>

<div id="d1">This goes up and down</div>

<button>Submit</button>

</body>
</html>

expoundsofttechsolution

J