Sha256: d81a2044ac5045762a7062aff91741c25b3cece5fb4ff82a0a6e633f7e38c82b
Contents?: true
Size: 731 Bytes
Versions: 4
Compression:
Stored size: 731 Bytes
Contents
/* * Hammer.JS jQuery plugin * version 0.3 * author: Eight Media * https://github.com/EightMedia/hammer.js */ jQuery.fn.hammer = function(options) { return this.each(function() { var hammer = new Hammer(this, options); var $el = jQuery(this); $el.data("hammer", hammer); var events = ['hold','tap','doubletap','transformstart','transform','transformend','dragstart','drag','dragend','swipe','release']; for(var e=0; e<events.length; e++) { hammer['on'+ events[e]] = (function(el, eventName) { return function(ev) { el.trigger(jQuery.Event(eventName, ev)); }; })($el, events[e]); } }); };
Version data entries
4 entries across 4 versions & 1 rubygems