We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a63edcc commit 12693c6Copy full SHA for 12693c6
README.md
@@ -1 +1,20 @@
1
# jQueryIsInViewport
2
+
3
+This plugin allows you to react when an element is in the viewport.
4
+You need throw confetti when the user scroll and see an element?, so this plugin is for you!
5
6
+## Usage
7
+```javascript
8
+$('.block').isInViewport(function (status) {
9
+ if (status === 'entered') {
10
+ $(this).addClass('throw-confetti')
11
+ }
12
13
+ if (status === 'leaved') {
14
+ $(this).removeClass('throw-confetti')
15
16
+})
17
+```
18
19
+## Options
20
+Status can be '**entered**' or '**leaved**'.
0 commit comments