Long Press (hold) With Jquery Hammer.js 2 And Event Delegation
I recently upgraded to hammer.js 2 and one of the first things a I noticed was that 'hold' has been replaced with 'press'. My old code worked fine with event delegation, but switch
Solution 1:
Hammer events have been simplified for speed in the new version. To reenable event delegation, just add domEvents:true as an option:
$(rootElement).hammer({domEvents:true}).on("press",".elementSelector",callback);
Post a Comment for "Long Press (hold) With Jquery Hammer.js 2 And Event Delegation"