Home:ALL Converter>After mousedown event mouseover should get fired

After mousedown event mouseover should get fired

Ask Time:2015-08-23T20:41:47         Author:Alok Sharma

Json Formatter

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)');
  })

Author:Alok Sharma,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/32166755/after-mousedown-event-mouseover-should-get-fired
yy