Skip to content

Commit 165ca1d

Browse files
committed
Fixed bug in _findBackgrounds() which caused to ignore elements with data-stellar-background if you pass them directly to stellar() function. Also replaced check for data property via "is([data-prop])" with "data('prop')".
1 parent 259d74b commit 165ca1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jquery.stellar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,8 @@
357357

358358
$backgroundElements = this.$element.find('[data-stellar-background-ratio]');
359359

360-
if (this.$element.is('[data-stellar-background-ratio]')) {
361-
$backgroundElements.add(this.$element);
360+
if (this.$element.data('stellar-background-ratio')) {
361+
$backgroundElements = $backgroundElements.add(this.$element);
362362
}
363363

364364
$backgroundElements.each(function() {

0 commit comments

Comments
 (0)