How can I delay a CSS change in jquery? Here is my code:
$(\"document\").ready(function() {
$(\".pressimage img\").mouseenter(function() {
$jq(this)
$("document").ready(function() {
$(".pressimage img").mouseenter(function() {
$jq(this).css('z-index','1000');
});
$(".pressimage img").mouseleave(1000,function() {
$jq(this).delay(500).css('z-index','1');
});
});
Does this work? :)
Try the following.
jQuery.fn.extend({
qcss: function(map){
$(this).queue(function(next){
$(this).css(map);
next();
});
return this;
}
});