@@ -32,8 +32,7 @@ $.magnificPopup.registerModule('gallery', {
32
32
initGallery : function ( ) {
33
33
34
34
var gSt = mfp . st . gallery ,
35
- ns = '.mfp-gallery' ,
36
- supportsFastClick = Boolean ( $ . fn . mfpFastClick ) ;
35
+ ns = '.mfp-gallery' ;
37
36
38
37
mfp . direction = true ; // true - next, false - prev
39
38
@@ -78,11 +77,10 @@ $.magnificPopup.registerModule('gallery', {
78
77
arrowLeft = mfp . arrowLeft = $ ( markup . replace ( / % t i t l e % / gi, gSt . tPrev ) . replace ( / % d i r % / gi, 'left' ) ) . addClass ( PREVENT_CLOSE_CLASS ) ,
79
78
arrowRight = mfp . arrowRight = $ ( markup . replace ( / % t i t l e % / gi, gSt . tNext ) . replace ( / % d i r % / gi, 'right' ) ) . addClass ( PREVENT_CLOSE_CLASS ) ;
80
79
81
- var eName = supportsFastClick ? 'mfpFastClick' : 'click' ;
82
- arrowLeft [ eName ] ( function ( ) {
80
+ arrowLeft . click ( function ( ) {
83
81
mfp . prev ( ) ;
84
82
} ) ;
85
- arrowRight [ eName ] ( function ( ) {
83
+ arrowRight . click ( function ( ) {
86
84
mfp . next ( ) ;
87
85
} ) ;
88
86
@@ -111,10 +109,6 @@ $.magnificPopup.registerModule('gallery', {
111
109
_mfpOn ( CLOSE_EVENT + ns , function ( ) {
112
110
_document . off ( ns ) ;
113
111
mfp . wrap . off ( 'click' + ns ) ;
114
-
115
- if ( mfp . arrowLeft && supportsFastClick ) {
116
- mfp . arrowLeft . add ( mfp . arrowRight ) . destroyMfpFastClick ( ) ;
117
- }
118
112
mfp . arrowRight = mfp . arrowLeft = null ;
119
113
} ) ;
120
114
0 commit comments