I have some textboxes. I want to change their border-color to black on mouseover after mousedown. But when I mousedown and select the outer area from cells then mouseover fires without firing mousedown.
Here is a fiddle of the problem and here is my javascript:
var _mouseDown = false;
$( "input[id^='text']" ).mousedown(function() {
_mouseDown = true;
});
$( "input[id^='text']" ).mousemove(function() {
if ( _mouseDown ) {
$(this).css("border-color","black")
}
});
$( "input[id^='text']" ).mouseup(function() {
_mouseDown = false;
});