Is there a way to delay css from firing using jquery?
I have some css which displays the menu on hover of an li but its really fast and i would like to delay it by 1 second or so.
I know i can do stuff like:
$('div#new-menu-lower ul li:hover ul li:first-child ul')
.delay(800)
.queue( function(next){
$(this).css('display','block');
next();
});
But is there a way to keep the css and use JQ/JS to delay the css class from loading that would be better?
There is a way. If you keep your CSS in an external file, reference that through the
linktag, then just after disabling the tag element, the DOM will stop referring the elements in the CSS. Then once u want to refer the elements, u can just enable the element.