jquery - Can I put delay(500) before an addClass()? -
$(document).ready(function(){ $("#info-text-container").click(function(){ $("#info-text").delay(500).addclass("info-text-active"); }); }); this not put delay on when gets clicked. want accomplish. why , hackable, possible overcome? thanks!
delay works animating methods, can use settimeout function:
$("#info-text-container").click(function(){ settimeout(function(){ $("#info-text").addclass("info-text-active"); }, 500); });
Comments
Post a Comment