@@ -15,21 +15,21 @@ Any image will fit. Try it out!
1515
1616### Old way
1717
18- Simply copy/paste the below snippet just before your closing ` </body> ` tag:
18+ Simply copy/paste the below snippet just before your closing ` </body> ` tag :
1919
2020``` html
2121<script src =" simpleParallax.js" ></script >
2222```
2323
24- or use the below CDN link provided by [ jsDelivr.com] ( https://www.jsdelivr.com/package/npm/simple-parallax-js ) :
24+ or use the below CDN link provided by [ jsDelivr.com] ( https://www.jsdelivr.com/package/npm/simple-parallax-js ) :
2525
2626``` html
2727<script src =" https://cdn.jsdelivr.net/npm/simple-parallax-js@5.6.1/dist/simpleParallax.min.js" ></script >
2828```
2929
3030### Via [ npm/yarn] ( https://www.npmjs.com/package/simple-parallax-js )
3131
32- You can also install it via:
32+ You can also install it via :
3333
3434``` sh
3535# npm
@@ -39,7 +39,7 @@ npm install simple-parallax-js
3939yarn add simple-parallax-js
4040```
4141
42- and then import it as follows:
42+ and then import it as follows :
4343
4444``` javascript
4545// ES6 import
@@ -51,13 +51,13 @@ const simpleParallax = require('simple-parallax-js');
5151
5252## Initialization
5353
54- Giving the following HTML:
54+ Giving the following HTML :
5555
5656``` html
5757 <img class =" thumbnail" src =" image.jpg" alt =" image" >
5858```
5959
60- simply add the following JavaScript code:
60+ simply add the following JavaScript code :
6161
6262``` javascript
6363const image = document .getElementsByClassName (' thumbnail' );
@@ -68,7 +68,7 @@ and voilà!
6868
6969___
7070
71- You can also choose to apply the parallax on multiple images:
71+ You can also choose to apply the parallax on multiple images :
7272
7373``` javascript
7474const images = document .querySelectorAll (' img' );
@@ -77,7 +77,7 @@ new simpleParallax(images);
7777
7878Once simpleparallax has been correctly initialized, it adds the ``` simple-parallax-initialized ``` class on the container.
7979
80- simpleParallax now works with video:
80+ simpleParallax now works with video :
8181
8282``` html
8383<video >
@@ -103,7 +103,7 @@ customContainer | String or Node | '' |
103103customWrapper | String | '' | the selector of the custom wrapper
104104maxTransition | Number | 0 | it should be a percentage between 1 and 99
105105
106- You can apply these settings with the following JS code:
106+ You can apply these settings with the following JS code :
107107
108108``` javascript
109109var images = document .querySelectorAll (' .thumbnail' );
@@ -144,7 +144,7 @@ The maxTransition setting should be used to stop the parallax animation after a
144144## Methods
145145
146146### refresh
147- Refresh a simpleParallax instance (to recalculate all the positions):
147+ Refresh a simpleParallax instance (to recalculate all the positions) :
148148
149149``` javascript
150150var images = document .querySelectorAll (' img' );
0 commit comments