code: function mousedown_callback(e) {
              // Only accept left click
              if (e.type == 'mousedown' && e.originalEvent.button != 0) return;
              oX = e.pageX || e.originalEvent.touches[0].pageX;
              oY = e.pageY || e.originalEvent.touches[0].pageY;
  
              bindDoc();
  
              // set a timeout to call the longpress callback when time elapses
              timeout = setTimeout(function() {
                  unbindDoc();
  
                  triggerCustomEvent(thisObject, "taphold", $.Event( "taphold", {
                      target: e.target,
                      pageX: oX,
                      pageY: oY
                  } ));
              }, duration);
  
              e.stopPropagation();
          }
docs: mousedown or touchstart callback