Using vmousedown to switch background on a button not working.
I'm trying to toggle the classes on vmousedown and vmouseup. It works ok one time per page div, then it stops working. I've tried $(document).on and delegate, though I'm not sure which element to tie it to. Is there a better way to just change background colors?
$(
'.logout'
).live(
'vmousedown'
,
function
(e) {
$(this).addClass('ui-bar-c');
}
$(
'.logout'
).live(
'vmouseup'
,
function
(e) {
$(this).removeClass('ui-bar-c');
}