I want to check if a element is being hovered over. I get this error:
Syntax error, unrecognized expression: unsupported pseudo: hover
when I use this code:
$('.class').blur(function(){
if(!$(this).is(':hover')){
//element not being hovered over
}
});
i also tried this:
$('.class').blur(function(){
if($(this+":hover").length === 0){
//element not being hovered over
}
});
this also does not work. Is there any other way of doing this. Thanks.
$(".class").mouseover(function(){
$(this).attr('checked',true);
});
});
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