javascript - How to create universal timeout function with jquery -


so, need have universal timeout function script. need use many times , want universalize it, try that, smthg wrong, can u me?

$.fn.timeout = function(action, time){     settimeout(function(){         action;     }, time);     return this; } 

and call:

.timeout(     settings_container.addclass('slide_down'), 200 ); 

thx.

you aren't executing action function,

change:

action; 

to:

action(); 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -