How to Create Callback Function in jQuery

How to Create Callback Function in jQuery

In this article, you will learn How to Create Callback Function in jQuery. Example:- <html> <head> <title>Callback Function in jQuery</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $("p").hide("slow", function(){ alert("The paragraph is now hidden"); }); }); }); </script> </head> <body> <button>Click to Hide</button> <p>Welcome to Hub of Tutorials.</p> </body> </html> Read on Facebook
Read Full Article
How-to-Create-Chaining-in-jQuery

How to Create Chaining in jQuery

In this article, you will learn How to Create Chaining in jQuery. Example:- <html> <head> <title>jQuery Chaining</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $("#p1").css("color", "red") .slideUp(2000) .slideDown(2000); }); }); </script> </head> <body> <p id="p1">Welcome ti Hub of Tutorials!!</p> <button>Click here</button> </body> </html> Read on Facebook
Read Full Article