jQuery delay()

The jQuery delay() method can be used to make a delay between the queued jQuery effects. Example: <!DOCTYPE html> <html> <head> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js”></script> <script> $(document).ready(function(){ $(“button”).click(function(){ $(“#div1″).delay(3000).fadeIn(); }); }); </script> </head> <body> <button>Click me</button><br> <div id=”div1″ style=”width:90px;height:90px;display:none;background-color:black;”></div><br> </body> </html> Syntax: $(selector).delay (speed, queueName) Speed: Speed is an optional parameter whose value specifies the speed of … Read more