Skip to content

Commit af6d14c

Browse files
committed
include note about the necessity of manually triggering a refresh when manipulating the DOM (ref issue #23 and issue #34)
1 parent be6d7f6 commit af6d14c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ Due to the nature of this implementation, you must ensure that these parallax ob
4444
}
4545
```
4646

47+
Also, keep in mind that once initialized, the parallax plugin presumes a fixed page layout unless it encounters a `scroll` or `resize` event. If you have a dynamic page in which another javascript method may alter the DOM, you must manually refresh the parallax effect with the following commands:
48+
49+
```javascript
50+
jQuery(window).trigger('resize').trigger('scroll');
51+
```
52+
4753
## Options
4854

4955
Options can be passed in via data attributes of JavaScript. For data attributes, append the option name to `data-`, as in `data-image-src=""`.

0 commit comments

Comments
 (0)