PageSourceSearch

https://www.fotografidimatrimonioroma.it/wp-content/themes/vega/js/jquery.touchwipe.1.1.1.js?ver=3.0

js fotografidimatrimonioroma.it collected 2026-10-01 13:53:29 UTC 1,962 bytes, 70 lines download raw bytes

1/**
2 * jQuery Plugin to obtain touch gestures from iPhone, iPod Touch and iPad, should also work with Android mobile phones (not tested yet!)
3 * Common usage: wipe images (left and right to show the previous or next image)
4 * 
5 * @author Andreas Waltl, netCU Internetagentur (http://www.netcu.de)
6 * @version 1.1.1 (9th December 2010) - fix bug (older IE's had problems)
7 * @version 1.1 (1st September 2010) - support wipe up and wipe down
8 * @version 1.0 (15th July 2010)
9 */
10(function($) { 
11   $.fn.touchwipe = function(settings) {
12     var config = {
13    		min_move_x: 20,
14    		min_move_y: 20,
15 			wipeLeft: function() { },
16 			wipeRight: function() { },
17 			wipeUp: function() { },
18 			wipeDown: function() { },
19			preventDefaultEvents: true
20	 };
21     
22     if (settings) $.extend(config, settings);
23 
24     this.each(function() {
25    	 var startX;
26    	 var startY;
27		 var isMoving = false;
28
29    	 function cancelTouch() {
30    		 this.removeEventListener('touchmove', onTouchMove);
31    		 startX = null;
32    		 isMoving = false;
33    	 }	
34    	 
35    	 function onTouchMove(e) {
36    		 if(isMoving) {
37	    		 var x = e.touches[0].pageX;
38	    		 var y = e.touches[0].pageY;
39	    		 var dx = startX - x;
40	    		 var dy = startY - y;
41	    		 if(Math.abs(dx) >= config.min_move_x) {
42	    			cancelTouch();
43	    			if(dx > 0) {
44	    				config.wipeLeft();
45	    			}
46	    			else {
47	    				config.wipeRight();
48	    			}
49	    		 }
50    		 }
51    	 }
52    	 
53    	 function onTouchStart(e)
54    	 {
55    		 if (e.touches.length == 1) {
56    			 startX = e.touches[0].pageX;
57    			 startY = e.touches[0].pageY;
58    			 isMoving = true;
59    			 this.addEventListener('touchmove', onTouchMove, false);
60    		 }
61    	 }    	 
62    	 if ('ontouchstart' in document.documentElement) {
63    		 this.addEventListener('touchstart', onTouchStart, false);
64    	 }
65     });
66 
67     return this;
68   };
69 
70 })(jQuery);

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.