File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ do ($$ = Quo) ->
73
73
@param {function} A function to execute when the event is triggered
74
74
###
75
75
$$ .fn .bind = (event , callback ) ->
76
- @ each -> _subscribe @ , event, callback
76
+ @forEach ( element ) -> _subscribe element , event, callback
77
77
78
78
79
79
###
Original file line number Diff line number Diff line change @@ -16,13 +16,6 @@ Quo.Gestures = do ($$ = Quo) ->
16
16
_data = null
17
17
_originalEvent = null
18
18
19
- $$ (document ).ready ->
20
- environment = $$ document .body
21
- environment .bind " touchstart" , _start
22
- environment .bind " touchmove" , _move
23
- environment .bind " touchend" , _end
24
- environment .bind " touchcancel" , _cancel
25
-
26
19
add = (gesture ) ->
27
20
_handlers[gesture .name ] = gesture .handler
28
21
_addDelegations gesture .events
@@ -67,5 +60,12 @@ Quo.Gestures = do ($$ = Quo) ->
67
60
touches = if $$ .isMobile () then event .touches else [event]
68
61
return ({x : t .pageX , y : t .pageY } for t in touches)
69
62
63
+ $$ (document ).ready ->
64
+ environment = $$ document .body
65
+ environment .bind " touchstart" , _start
66
+ environment .bind " touchmove" , _move
67
+ environment .bind " touchend" , _end
68
+ environment .bind " touchcancel" , _cancel
69
+
70
70
add : add
71
71
trigger : trigger
You can’t perform that action at this time.
0 commit comments