0

Trying to use double-click of jquery.finger plugin for mobile, but also want to support standard desktop click. Is this possible, anyone? or @ngryman

Simple example:

<div id="mydiv">
  <i></i>
  <span>Text</span>
</div>

$('#mydiv').on('doubletap', function() {
  // do something in both desktop & mobile
});

Currently, in desktop, a single click doesn't do anything.

parti
  • 205
  • 3
  • 15
  • @ngryman - would love to hear your suggestion on this – parti Sep 19 '14 at 17:44
  • possible duplicate of [jQuery multiple events to trigger the same function](http://stackoverflow.com/questions/2534089/jquery-multiple-events-to-trigger-the-same-function) – Joseph Sep 19 '14 at 17:55

1 Answers1

2
$('#mydiv').on('doubletap click', function(e) {

  // do something in both desktop & mobile
      e.stopPropagation();
});
Joseph
  • 1,076
  • 10
  • 22