html - jquery slide on user click -
i want create div disappear after x seconds.with simple piece of code,this div slidedown( jquery slidedown() method) when user clicks button.
$(document).ready(function(){ $("#flip").click(function(){ $("#panel").slidedown("slow"); }); }); <div id ="flip">user click</div> <div id = "panel">contents</div> i need #flip automatically disappear after x seconds.but of course,the #panel remain.i'm new in jquery , want add together nice looks on html.
not sure if want disappear after clicking or what?
you can utilize settimout run code after x milliseconds
settimout(function() { $("#flip").hide(); // or .remove() if want rid of }, 5000); //5000 milliseconds you set within of click event handler create happen after clicking.
jquery html
No comments:
Post a Comment