javascript - Can I add a delay in between 'click' and 'addClass' in jQuery? -


this question has answer here:

can add delay before addclass method?

this doesnt seem working me.

$("#btn").click(function dostuff(){     $("#myobj").show();     $("#myobj").animate({left: "15"});     $(".secondobj").delay(1000).addclass('glow');     $(".thirdobj").addclass('topglow'); )}; 

thanks

$("#btn").click(function dostuff(){     $("#myobj").show();     $("#myobj").animate({left: "15"});      settimeout(function () {         // wait 1 second , add class         $(".secondobj").addclass('glow');     }, 1000);      $(".thirdobj").addclass('topglow'); }); 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -