stephband / jquery.event.swipe

jQuery custom events swipeleft, swiperight, swipeup and swipedown
stephband.info/jquery.event.swipe
446 stars 180 forks source link

Use dimensions of the element the swipe event is delegated to #18

Closed jasoncodes closed 10 years ago

jasoncodes commented 10 years ago

"event.target" matches the DOM element directly under the cursor. "event.delegateTarget" matches the DOM element ".on" was called on.

stephband commented 10 years ago

Makes sense. Although since the swipe events forbid delegation for performance I'd prefer to use e.currentTarget, which should be the same thing in this case. I'll accept and edit. Cheers.

jasoncodes commented 10 years ago

Cool. I wasn’t quite sure which of currentTarget or delegateTarget would make most sense.