Skip to content

Commit c5f5ae4

Browse files
author
Julian Lloyd
committed
Revise README
1 parent 05e1bc2 commit c5f5ae4

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Once you have a copy of `scrollReveal.js`, place it in your JavaScript folder, a
2323

2424

2525
```html
26-
<!-- Everything else… -->
26+
<!-- Everything else… -->
2727

2828
<script src='{your_JavaScript_path}/scrollReveal.js'></script>
2929
<script>
@@ -130,20 +130,23 @@ Advanced Usage
130130
####Custom defaults
131131
You can pass an object to the constructor with your desired default configuration.
132132
```html
133-
<script>
133+
<!-- Everything else. -->
134134

135-
// The starting defaults.
136-
var config = {
137-
enter: 'bottom',
138-
move: '0',
139-
over: '0.66s',
140-
delay: '0s',
141-
viewportFactor: 0.33,
142-
reset: false,
143-
init: true
144-
};
135+
<script src='{your_JavaScript_path}/scrollReveal.js'></script>
136+
<script>
145137
146-
window.scrollReveal = new scrollReveal( config );
138+
// The starting defaults.
139+
var config = {
140+
enter: 'bottom',
141+
move: '0',
142+
over: '0.66s',
143+
delay: '0s',
144+
viewportFactor: 0.33,
145+
reset: false,
146+
init: true
147+
};
148+
149+
window.scrollReveal = new scrollReveal( config );
147150
148151
</script>
149152
</body>
@@ -155,7 +158,7 @@ You may have dynamically generated HTML in your use case, (AJAX, templates, othe
155158

156159
*Example:*
157160
```html
158-
<!-- Everything else. -->
161+
<!-- Everything else. -->
159162

160163
<script src='{your_JavaScript_path}/scrollReveal.js'></script>
161164
<script>
@@ -204,7 +207,7 @@ If set to **1**, the element is considered in the viewport when it is fully visi
204207
<!-- Note: The reset keyword works by itself. -->
205208
<div data-scrollReveal="reset"> Foo </div>
206209
```
207-
> **Important Note:** scrollReveal by defaut does not reset reveal animations, and will remove the appended `style` attribute (containing generated CSS) from your elements.<br><br>However, to prevent flickering in reveal animations when using the keyword `reset`, scrollReveal does not remove the this appended `style` attribute.<br><br>This means using the `reset` keyword may cause the scrollReveal animation CSS properties to override or conflict with any other CSS transform and transition properties on that element.
210+
> **Important Note:** scrollReveal by defaut does not reset reveal animations, and will remove the appended `style` attribute (containing generated CSS) from your elements once the reveal animation is complete.<br><br>However when using `reset` (to prevent flickering in reveal animations), scrollReveal does not remove the appended `style` attribute.<br><br>This means using the `reset` keyword may cause the scrollReveal animation CSS properties to override or conflict with any other CSS transform and transition properties on that element.
208211
209212
#### Controlling Easing
210213
The `move` keyword can be replaced with any one of the following:<br><br>

0 commit comments

Comments
 (0)