I have some hover() JS code:
$( '.leftMenuProductWrapper').hover (
function () {
},
function () {
});
In the second function, I need something like:
If ($("#leftMenuWrapper2").hasMouseover){
do this
}else{
do that};
I can't find any documentation on how to do it.
EDIT:
This appears to be a solution:
$('#leftMenuWrapper2').mouseenter(function(){
mouseover = true;
}).mouseleave(function(){
mouseover = false;
});
And then later on in the code, reference it:
if(mouseover == false){
doSomething
};
At a very high level, what you want is something to:
All you have to do is return the Boolean value to get the hasMouseOver
value.
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