File tree 2 files changed +8
-10
lines changed 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 136
136
this . _startAnimationLoop ( ) ;
137
137
} ,
138
138
_defineElements : function ( ) {
139
- this . $element = this . element === window ? $ ( 'body' ) : $ ( this . element ) ;
140
-
141
- if ( this . options . scrollProperty === 'scroll' ) {
142
- this . $scrollElement = this . element === window || this . element . nodeName === 'BODY' || this . element . nodeName === 'HTML' ? $ ( window ) : this . $element ;
143
- } else {
144
- this . $scrollElement = this . $element ;
145
- }
146
-
139
+ this . $scrollElement = $ ( this . element ) ;
140
+ this . $element = this . element === window ? $ ( 'body' ) : this . $scrollElement ;
147
141
this . $viewportElement = ( this . options . viewportElement !== undefined ? $ ( this . options . viewportElement ) : ( this . $scrollElement [ 0 ] === window ? this . $scrollElement : this . $scrollElement . parent ( ) ) ) ;
148
142
} ,
149
143
_defineGetters : function ( ) {
288
282
289
283
if ( ! this . options . parallaxBackgrounds ) return ;
290
284
291
- $backgroundElements = this . $element . add ( this . $element . find ( '[data-stellar-background-ratio]' ) ) ;
285
+ $backgroundElements = this . $element . find ( '[data-stellar-background-ratio]' ) ;
286
+
287
+ if ( this . $element . is ( '[data-stellar-background-ratio]' ) ) {
288
+ $backgroundElements . add ( this . $element ) ;
289
+ }
292
290
293
291
$backgroundElements . each ( function ( ) {
294
292
var $this = $ ( this ) ,
You can’t perform that action at this time.
0 commit comments