jquery hover event between mousedown and mouseup - possible?
- by Haroldo
If you imagine in microsoft paint you can click and hold to paint in an area, id like to do a similar but adding a class to cells in a table:
(note this isnt for painting/art just an easy way of explaining it!)
the following isnt working...
$(function(){
$('td').mousedown(function(){
console.log('down');
$('td').bind('hover', function(){
$(this).addClass('booked');
});
})
$('td').mouseup(function(){
$('td').unbind('hover');
});
})