PluginProbe
School Management System – WPSchoolPress / 2.2.38
School Management System – WPSchoolPress v2.2.38
2.2.48 2.2.47 2.2.46 2.2.45 2.2.44 2.2.43 2.2.42 2.2.41 2.2.40 2.2.39 2.2.38 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 All 103 releases
wpschoolpress / js / lib / jquery.draggable.js

jquery.draggable.js in School Management System – WPSchoolPress 2.2.38, at js/lib/jquery.draggable.js

141 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*
2
3
4
5 * jQuery Double Tap
6
7
8
9 * Developer: Sergey Margaritov (sergey@margaritov.net)
10
11
12
13 * Date: 22.10.2013
14
15
16
17 * Based on jquery documentation http://learn.jquery.com/events/event-extensions/
18
19
20
21 */
22
23
24
25
26
27
28
29 (function($){
30
31
32
33
34
35
36
37 $.event.special.doubletap = {
38
39
40
41 bindType: 'touchend',
42
43
44
45 delegateType: 'touchend',
46
47
48
49
50
51
52
53 handle: function(event) {
54
55
56
57 var handleObj = event.handleObj,
58
59
60
61 targetData = jQuery.data(event.target),
62
63
64
65 now = new Date().getTime(),
66
67
68
69 delta = targetData.lastTouch ? now - targetData.lastTouch : 0,
70
71
72
73 delay = delay == null ? 300 : delay;
74
75
76
77
78
79
80
81 if (delta < delay && delta > 30) {
82
83
84
85 targetData.lastTouch = null;
86
87
88
89 event.type = handleObj.origType;
90
91
92
93 ['clientX', 'clientY', 'pageX', 'pageY'].forEach(function(property) {
94
95
96
97 event[property] = event.originalEvent.changedTouches[0][property];
98
99
100
101 })
102
103
104
105
106
107
108
109 // let jQuery handle the triggering of "doubletap" event handlers
110
111
112
113 handleObj.handler.apply(this, arguments);
114
115
116
117 } else {
118
119
120
121 targetData.lastTouch = now;
122
123
124
125 }
126
127
128
129 }
130
131
132
133 };
134
135
136
137
138
139
140
141 })(jQuery);