Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
jQuery plugin - add temporary class name
$.fn.addTempClass = function(tempClass, duration){
if( !tempClass )
return this;
return this.each(function(){
var $elm = $(this);
}, duration || 100);

This comment has been minimized.

Copy link
Owner Author

@yairEO yairEO commented Aug 25, 2014

Adds some class (or classes) to an element for a specific duration, then removes it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment