File tree Expand file tree Collapse file tree 3 files changed +25
-22
lines changed Expand file tree Collapse file tree 3 files changed +25
-22
lines changed Original file line number Diff line number Diff line change @@ -34,25 +34,3 @@ document.querySelectorAll('.console-block label').forEach(function (el) {
34
34
} ) ;
35
35
} ) ;
36
36
} ) ;
37
-
38
- // Add animation class to feature icons when they are fully visible
39
- ( function ( ) {
40
- const observer = new IntersectionObserver (
41
- function ( entries ) {
42
- entries . forEach ( function ( entry ) {
43
- if ( ! entry . isIntersecting ) {
44
- return ;
45
- }
46
-
47
- entry . target . classList . add ( 'inview' ) ;
48
-
49
- observer . unobserve ( entry . target ) ;
50
- } ) ;
51
- } ,
52
- { threshold : 1.0 } ,
53
- ) ;
54
-
55
- document . querySelectorAll ( '.list-features i' ) . forEach ( function ( el ) {
56
- observer . observe ( el ) ;
57
- } ) ;
58
- } ) ( ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ define(function () {
9
9
return ! ! document . getElementsByClassName ( className ) . length ; //return a boolean
10
10
}
11
11
12
+ //feature list
13
+ if ( hasClass ( 'list-features' ) ) {
14
+ mods . push ( 'mod/list-feature' ) ;
15
+ }
16
+
12
17
//collapsing list
13
18
if ( hasClass ( 'list-collapsing' ) ) {
14
19
mods . push ( 'mod/list-collapsing' ) ;
Original file line number Diff line number Diff line change
1
+ define ( [ 'jquery' ] , function ( $ ) {
2
+ const observer = new IntersectionObserver (
3
+ function ( entries ) {
4
+ entries . forEach ( function ( entry ) {
5
+ if ( ! entry . isIntersecting ) {
6
+ return ;
7
+ }
8
+
9
+ $ ( entry . target ) . addClass ( 'inview' ) ;
10
+
11
+ observer . unobserve ( entry . target ) ;
12
+ } ) ;
13
+ } ,
14
+ { threshold : 1.0 } ,
15
+ ) ; // Trigger when the element is fully visible
16
+
17
+ $ ( '.list-features i' ) . each ( function ( ) {
18
+ observer . observe ( this ) ;
19
+ } ) ;
20
+ } ) ;
You can’t perform that action at this time.
0 commit comments