1/* 2 * Hammer.JS jQuery plugin 3 * version 0.3 4 * author: Eight Media 5 * https://github.com/EightMedia/hammer.js 6 */ 7jQuery.fn.hammer = function(options) 8{ 9 return this.each(function() 10 { 11 var hammer = new Hammer(this, options); 12 13 var $el = jQuery(this); 14 $el.data("hammer", hammer); 15 16 var events = ['hold','tap','doubletap','transformstart','transform','transformend','dragstart','drag','dragend','swipe','release']; 17 18 for(var e=0; e<events.length; e++) { 19 hammer['on'+ events[e]] = (function(el, eventName) { 20 return function(ev) { 21 el.trigger(jQuery.Event(eventName, ev)); 22 }; 23 })($el, events[e]); 24 } 25 }); 26};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.