[jQuery] passing this reference to setTimeout()
I'm using jQuery.hover for a dropdown menu and I want to add a slight
delay to mouseOut functions but I can't figure out how to pass the
jQuery(this) reference into the setTimeout() function... can this be
done?
ex.
jQuery('li.drop').hover(
function(){
jQuery(this).addClass('show');
},
function(){
var t = setTimeout( function(){ jQuery(this).removeClass('show'); },
1000);
}
);