File tree Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Original file line number Diff line number Diff line change 1
- # scrollView.js
2
- Simple and fast event listener for enter viewport in pure Java-Script
1
+ <p align =" center " >
2
+ <img src =" https://www.bit01.de/wp-content/uploads/2020/03/scrollEvent-logo.png " height =" 200 " />
3
+ </p >
4
+
5
+ <p align =" center " >
6
+ <img src =" https://img.shields.io/github/size/bitnulleins/scrollView.js/scrollView.min.js?label=size%20%28minimize%29 " /> <img src =" https://img.shields.io/npm/v/scrollviewjs " /> <img src =" https://img.shields.io/npm/dm/scrollviewjs " /> <img src =" https://img.shields.io/github/issues/bitnulleins/scrollView.js " />
7
+ </p >
8
+
9
+ # What is scrollEvent.js?
10
+ Simple and fast event listener for enter viewport in pure Java-Script. The features are:
11
+ * Event focused from viewport
12
+ * Fast und small size
13
+ * Multiple instances (and events) possible
14
+
15
+ # How does it works?
16
+ 1 . First add the library to the header:
17
+ ``` html
18
+ <script type =" text/javascript" src =" scrollView.js" ></script >
19
+ ```
20
+ 2 . Now add an ScrollEvent listener for an element:
21
+
22
+ ``` javascript
23
+ < script type= " text/javascript" >
24
+ ScrollEvent ().visible (** element** , () => {
25
+ // what should happen if **element** is visible?
26
+ });
27
+ < / script>
28
+ ```
29
+
30
+ # Example
31
+ ...
You can’t perform that action at this time.
0 commit comments