PageSourceSearch

https://www.lukashd.com/img_up/_addon/_plugin/mobileTouch/touchEvnet_v.0.1.1.js

js lukashd.com collected 2026-10-02 00:17:46 UTC 1,605 bytes, 68 lines download raw bytes

1/*
2	@ 사용법
3	$(this).tabClick({
4		touchStart : function() { console.log('영역에 손을대면 실행'); }
5		,touchMove : function() { console.log('영역에 손을 댄 상태에서 이동할때마다 실행'); }
6		,touchEnd : function() { console.log('화면에서 손을 떼면실행'); }
7	});
8*/
9
10;(function($){
11	// 화면에 누르고나서 이동하지 않고 화면에서 떼면 complete메서드가 실행된다.
12	$.fn.tabClick = function(options)
13	{
14		var
15			$this = $(this),
16			$defaults = {
17				touchStart : function($this) {},
18				touchMove : function($this) {},
19				touchEnd : function($this) {}
20			},
21			$opts = $.extend($defaults, options),
22			$move,
23			is_touch_device = function() {
24				return !!('ontouchstart' in window) // works on most browsers 
25					|| !!('onmsgesturechange' in window && window.navigator.msMaxTouchPoints) // works on ie10
26				;
27			},
28			_init = function()
29			{
30				//console.log(window.navigator.msMaxTouchPoints);
31				//console.log(is_touch_device());
32				if (is_touch_device()) {
33					$this.bind('touchstart', onTouchStart);
34					$this.bind('touchmove', onTouchMove);
35					$this.bind('touchend', onTouchEnd);
36					//console.log('touch');
37				} else {
38					$this.bind('click', function(){
39						$opts.touchEnd($(this));
40						return false;
41					});
42				}
43			}
44		;
45
46		function onTouchStart()
47		{
48			$move = false;
49			$opts.touchStart($(this));
50		}
51		
52		function onTouchMove()
53		{
54			$move = true;
55			$opts.touchMove($(this));
56		}
57		
58		function onTouchEnd()
59		{
60			if (!$move) {
61				$opts.touchEnd($(this));
62				return false;
63			}
64		}
65
66		_init();
67	}
68})(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.