I just want to fire an event which on mouse key press should select textboxes and change its border-color
to black
.
How to keep sure that on mousedown
event only mouseover
event should get fired? Initially, it happens on mousedown
: it drags and gets selected.
But after that mouseover
gets fired automatically without hit of mousedown
function.
Here is my code:
var clicking = false;
$(document).on("mousedown", "[id^='text']", function () {
$(document).on("mouseover", "[id^='text']", function () {
$(this).css('border-color', 'rgb(0, 255, 0)');
})