1/* 2 By Osvaldas Valutis, www.osvaldas.info 3 Available for use under the MIT License 4*/ 5 6 7 8;(function( $, window, document, undefined ) 9{ 10 $.fn.doubleTapToGo = function( params ) 11 { 12 if( !( 'ontouchstart' in window ) && 13 !navigator.msMaxTouchPoints && 14 !navigator.userAgent.toLowerCase().match( /windows phone os 7/i ) ) return false; 15 16 this.each( function() 17 { 18 var curItem = false; 19 var isTouchEvent = false; 20 21 $( this ).on( 'click', function( e ) 22 { 23 if (isTouchEvent){ 24 var item = $( this ); 25 if( item[ 0 ] != curItem[ 0 ] ) 26 { 27 e.preventDefault(); 28 curItem = item; 29 } 30 } 31 }); 32 33 $( document ).on( 'click touchstart MSPointerDown', function( e ) 34 { 35 if (e.type == 'touchstart'){ 36 isTouchEvent = true; 37 } 38 39 var resetItem = true, 40 parents = $( e.target ).parents(); 41 42 for( var i = 0; i < parents.length; i++ ) 43 if( parents[ i ] == curItem[ 0 ] ) 44 resetItem = false; 45 46 if( resetItem ) 47 curItem = false; 48 }); 49 }); 50 return this; 51 }; 52})( jQuery, window, document );
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.