I use the following code-snippet on my page …
if ( $("#footer, #header").is(':visible') && && !$("#footer, #header").is(':hover') ) {
I upgraded to the latest jQuery Version and now this .is(:hover) is no longer supported.
How do I subistute this in my code above. I googled already and found a few threads regarding this issue, but couldn't seem to find an appropriate solution for my code above.
I use this code to handle a timeout event. If my mouse is over the header or footer, I don't want the timeout to be cleared.
You could add a class on the hover event for the elements and then check the class exists.
Toggle class on hover:
$("#footer, #header").hover(function() {
$(this).toggleClass('hover');
});
Check for class:
if (!$("#footer, #header").hasClass('hover')) {
//do your stuff
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With