How can I delay a CSS change in jquery? Here is my code:
$(\"document\").ready(function() { $(\".pressimage img\").mouseenter(function() { $jq(this)
Delay only works on items in the queue so you need to add your css change to the queue for the delay to work. Then dequeue. The following code illustrates this:
$('.pressimage img') .delay(1000) .queue(function(){ $(this).css({'z-index','1'}); $(this).dequeue(); });