I noticed that if I click on the button, move the pointer out of the button area, and then return to it without releasing the button, it still remembers that I have a button with the button pressed.
I'm trying to set the button style accordingly, can someone enlighten me as the right JavaScript / jQuery event to use for this?
I would really like to use some kind of counter for this.
EDIT: current hacker solution OK;
Globally called hotbutton
$('.thisbutton').onmouseenter{if (hotbutton='thisbutton'){drawmousedowntheme();}}
$('.thisbutton').onmousedown{hotbutton='thisbutton';drawmousedowntheme();}
$(document).onmouseup{hotbutton=''}
source
share