File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
/*!
2
- * jQuery Bully Plugin v0.1.2
2
+ * jQuery Bully Plugin v0.1.3
3
3
* Examples and documentation at http://pixelgrade.github.io/rellax/
4
4
* Copyright (c) 2016 PixelGrade http://www.pixelgrade.com
5
5
* Licensed under MIT http://www.opensource.org/licenses/mit-license.php/
11
11
windowHeight = $window . height ( ) ,
12
12
elements = [ ] ,
13
13
$bully ,
14
- lastScrollY = window . scrollY ,
14
+ lastScrollY = ( window . pageYOffset || document . documentElement . scrollTop ) - ( document . documentElement . clientTop || 0 ) ,
15
15
current = 0 ,
16
16
inversed = false ,
17
17
frameRendered = true ;
81
81
82
82
$window . on ( 'scroll' , function ( e ) {
83
83
if ( frameRendered === true ) {
84
- lastScrollY = window . scrollY ;
84
+ lastScrollY = ( window . pageYOffset || document . documentElement . scrollTop ) - ( document . documentElement . clientTop || 0 ) ;
85
85
}
86
86
frameRendered = false ;
87
87
} ) ;
129
129
}
130
130
131
131
if ( self . options . scrollDuration === 'auto' ) {
132
- var duration = Math . abs ( window . scrollY - self . offset . top ) / (
132
+ var duration = Math . abs ( lastScrollY - self . offset . top ) / (
133
133
self . options . scrollPerSecond / 1000
134
134
) ;
135
135
$target . animate ( { scrollTop : self . offset . top } , duration ) ;
153
153
scrollPerSecond : 4000
154
154
} ;
155
155
156
- $window . on ( 'rellax ' + $ . fn . bully . defaults . reloadEvent , reloadAll ) ;
156
+ $window . on ( 'rellax load' , reloadAll ) ;
157
157
158
158
159
159
}
You can’t perform that action at this time.
0 commit comments