1

Why does:

$(document).on('mousedown', '.noUi-handle', function() {
    $(this).find('.noUi-tooltip').show();
});

Only trigger when I right-click .noUi-handle ?

I want it to trigger only on left-click.

Barskey
  • 423
  • 2
  • 5
  • 18
  • 1
    Does this answer your question? [How to distinguish between left and right mouse click with jQuery](https://stackoverflow.com/questions/1206203/how-to-distinguish-between-left-and-right-mouse-click-with-jquery) – Richard Jan 30 '20 at 08:23
  • @Richard It helps but it doesn't answer the question why it only triggers on right click, I'm now using the focus & focusout events as this works even better in my case. Thanks – Barskey Jan 30 '20 at 08:34

1 Answers1

0

Use click event instead of mousedown.

$(document).on('click', '.noUi-handle', function() {
    $(this).find('.noUi-tooltip').show();
});
Grey Chanel
  • 212
  • 1
  • 5
  • I want to use the mousedown event because I'm dragging&dropping the `.noUi-handle`, I want it to trigger as soon as I press down the mouse button, without releasing it. – Barskey Jan 30 '20 at 08:29