Prev Demo
jQuery
>
.Delay() - Delay Execution Of Method
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> </head> <body> <input type="button" id="btnDelay" value="Click and Delay Animation" /></p> <div id="divDelay" style="height: 50px; width: 50px; background: green; left: 0px; display: none; position: absolute;"> </div> <script> $("#btnDelay").click(function () { $("#divDelay").slideDown().delay(500).fadeOut(); }); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output