I've noticed that if I mouse-down on a button, move my pointer from the button area, then return to it without releasing the button it still remembers that i have 'mouse-downed' on the button.
I'm trying to set button styles appropriately, could anyone enlighten me as the correct JavaScript/jQuery event to use for this?
I would really hate to use some sort of counter for this.
EDIT: OK current hacky solution;
Global called hotbutton
$('.thisbutton').onmouseenter{if (hotbutton='thisbutton'){drawmousedowntheme();}}
$('.thisbutton').onmousedown{hotbutton='thisbutton';drawmousedowntheme();}
$(document).onmouseup{hotbutton=''}
What I do is:
The actual important stuff I always bind to "click".
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