2
2
title : js-css-animations
3
3
---
4
4
5
- # js-css-animations
5
+ # Modules
6
6
7
7
## js-css-animations.js
8
8
9
9
Builds the animation API that will be exported to the final user
10
10
11
- - [ js-css-animations] ( #js-css-animations )
11
+ - _ export_
12
+
13
+ - [ jsCssAnimations] ( #jscssanimations ) : <code >Object.< ; string, (function()\| object)> ; </code >
14
+
15
+ - _ inner_
16
+
12
17
- [ animationFunctions] ( #animationfunctions ) : <code >Object</code >
13
18
- [ eventBoundAnimations] ( #eventboundanimations ) : <code >Object.< ; string, function()> ; </code >
14
19
- [ verifyAnimationName] ( #verifyanimationname ) : <code >ProxyHandler</code >
15
20
- [ .get(animations, name)] ( #verifyanimationname-get-animations-name )
16
- - [ jsCssAnimations] ( #jscssanimations ) : <code >Object.< ; string, (function()\| object)> ; </code >
17
21
- [ selectElement(selector)] ( #selectelement-selector ) ⇒ <code >HTMLElement</code >
18
22
- [ selectAllElements(selector)] ( #selectallelements-selector ) ⇒ <code >NodeList.< ; Element> ; </code >
19
23
- [ getTargets(selector)] ( #gettargets-selector ) ⇒ <code >NodeList.< ; Element> ; </code > \| <code >Array.< ; HTMLElement> ; </code >
@@ -24,7 +28,15 @@ Builds the animation API that will be exported to the final user
24
28
- [ isVisible(selector)] ( #isvisible-selector ) ⇒ <code >boolean</code >
25
29
- [ isHidden(selector)] ( #ishidden-selector ) ⇒ <code >boolean</code >
26
30
27
- ### animationFunctions : <code >Object</code >
31
+ ## jsCssAnimations : <code >Object.< ; string, (function()\| Object)> ; </code >
32
+
33
+ An API encapsulating all the functions that can be used by the user,
34
+ like all the animations functions and auxiliary functions like:
35
+ isTransformed(), isVisible() and isHidden()
36
+
37
+ ** Kind** : inner constant of [ <code >js-css-animations</code >] ( #js-css-animations )
38
+
39
+ ## animationFunctions : <code >Object</code >
28
40
29
41
An object containing all the animations functions.
30
42
@@ -33,25 +45,26 @@ animationFunctions.hide and animationFunctions.show
33
45
34
46
All other keys of animationFunctions are Motion animations functions
35
47
36
- ** Kind** : inner constant of [ <code >js-css-animations</code >] ( #js-css-animations )
37
- ** See**
48
+ ** Kind** : inner constant of [ <code >js-css-animations</code >] ( #js-css-animations )
49
+
50
+ ** See** :
38
51
39
- - [ module : globals .VISIBILITY_ANIMS_ID] ( module: globals.VISIBILITY_ANIMS_ID )
40
- - [ module : globals .MOTION_ANIMS_ID] ( module: globals.MOTION_ANIMS_ID )
52
+ - [ globals.VISIBILITY_ANIMS_ID] ( globals.html#globals-visibility-anims-id )
53
+ - [ globals.MOTION_ANIMS_ID] ( globals.html#globals-motion-anims-id )
41
54
42
- ### eventBoundAnimations : <code >Object.< ; string, function()> ; </code >
55
+ ## eventBoundAnimations : <code >Object.< ; string, function()> ; </code >
43
56
44
57
An object containing animations functions wich are triggered by an event (like 'click')
45
58
46
59
** Kind** : inner constant of [ <code >js-css-animations</code >] ( #js-css-animations )
47
60
48
- ### verifyAnimationName : <code >ProxyHandler</code >
61
+ ## verifyAnimationName : <code >ProxyHandler</code >
49
62
50
63
Will throw an ReferenceError if the animation name does not corresponds to any animation function
51
64
52
65
** Kind** : inner constant of [ <code >js-css-animations</code >] ( #js-css-animations )
53
66
54
- #### verifyAnimationName.get(animations, name)
67
+ ### verifyAnimationName.get(animations, name)
55
68
56
69
** Kind** : static method of [ <code >verifyAnimationName</code >] ( #verifyanimationname )
57
70
@@ -60,15 +73,7 @@ Will throw an ReferenceError if the animation name does not corresponds to any a
60
73
| animations | <code >Object.< ; string, function()> ; </code > | Object containing animation functions |
61
74
| name | <code >string</code > | Name of the animation |
62
75
63
- ### jsCssAnimations : <code >Object.< ; string, (function()\| Object)> ; </code >
64
-
65
- An API encapsulating all the functions that can be used by the user,
66
- like all the animations functions and auxiliary functions like
67
- isTransformed(), isVisible() and isHidden()
68
-
69
- ** Kind** : inner constant of [ <code >js-css-animations</code >] ( #js-css-animations )
70
-
71
- ### selectElement(selector) ⇒ <code >HTMLElement</code >
76
+ ## selectElement(selector) ⇒ <code >HTMLElement</code >
72
77
73
78
If 'selector' is a string containing a valid CSS selector,
74
79
it will be used to perform a querySelector(),
@@ -81,7 +86,7 @@ If 'selector' is already an HTMLElement it will be returned as it is.
81
86
| -------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
82
87
| selector | <code >Element</code > \| <code >string</code > | If it's an HTMLElement, 'selector' will be returned as it is. If it's a string, it should be a valid CSS selector |
83
88
84
- ### selectAllElements(selector) ⇒ <code >NodeList.< ; Element> ; </code >
89
+ ## selectAllElements(selector) ⇒ <code >NodeList.< ; Element> ; </code >
85
90
86
91
Returns a NodeList with all elements that match 'selector'
87
92
@@ -92,7 +97,7 @@ Returns a NodeList with all elements that match 'selector'
92
97
| -------- | ------------------- | ------------------------------------------------------- |
93
98
| selector | <code >string</code > | A valid CSS selector to be passed to querySelectorAll() |
94
99
95
- ### getTargets(selector) ⇒ <code >NodeList.< ; Element> ; </code > \| <code >Array.< ; HTMLElement> ; </code >
100
+ ## getTargets(selector) ⇒ <code >NodeList.< ; Element> ; </code > \| <code >Array.< ; HTMLElement> ; </code >
96
101
97
102
Gets the element(s) to be animated. The user can pass either an HTMLElement or a CSS selector as a target to the animation
98
103
@@ -103,7 +108,7 @@ Gets the element(s) to be animated. The user can pass either an HTMLElement or a
103
108
| -------- | ----------------------------------------------- | ------------------------------------------------------------------------- |
104
109
| selector | <code >HTMLElement</code > \| <code >string</code > | An HTMLElement or a valid CSS selector to be passed to querySelectorAll() |
105
110
106
- ### toggle(selector, animA, animB, opts)
111
+ ## toggle(selector, animA, animB, opts)
107
112
108
113
Toggles between two animations.
109
114
@@ -112,7 +117,7 @@ it will toggle between the 'hide' state and the 'show' state,
112
117
although this is only applicable to visibility animations.
113
118
114
119
** Kind** : inner method of [ <code >js-css-animations</code >] ( #js-css-animations )
115
- ** See** : [ module : globals .VISIBILITY_ANIMS_ID] ( module: globals.VISIBILITY_ANIMS_ID )
120
+ ** See** : [ globals.VISIBILITY_ANIMS_ID] ( globals.html#globals-visibility-anims-id )
116
121
117
122
| Param | Type | Description |
118
123
| -------- | ----------------------------------------------- | -------------------------------------------------------------------------- |
@@ -121,15 +126,15 @@ although this is only applicable to visibility animations.
121
126
| animB | <code >string</code > | The next animation name |
122
127
| opts | <code >Object</code > \| <code >Object</code > | All options that can be passed by the user to customize the animation |
123
128
124
- #### toggle~ element
129
+ ### toggle~ element
125
130
126
131
The current animation attribute will only be set in the first element that
127
132
matches the 'selector' passed, but the animation will apply to all elements
128
133
matched by 'selector'
129
134
130
135
** Kind** : inner constant of [ <code >toggle</code >] ( #toggle-selector-anima-animb-opts )
131
136
132
- ### checkTransform(selector) ⇒ <code >boolean</code >
137
+ ## checkTransform(selector) ⇒ <code >boolean</code >
133
138
134
139
Verifies if an element is out of its original orientation or scale.
135
140
@@ -144,7 +149,7 @@ out of its original orientation.
144
149
| -------- | ----------------------------------------------- | --------------------------------------------------------------- |
145
150
| selector | <code >HTMLElement</code > \| <code >string</code > | An element or a valid CSS selector corresponding to the element |
146
151
147
- ### checkVisibility(selector, mode) ⇒ <code >boolean</code >
152
+ ## checkVisibility(selector, mode) ⇒ <code >boolean</code >
148
153
149
154
Verifies if a given element is hidden or visible
150
155
@@ -156,7 +161,7 @@ Verifies if a given element is hidden or visible
156
161
| selector | <code >Element</code > \| <code >string</code > | An element or a valid CSS selector corresponding to the element |
157
162
| mode | <code >string</code > | Either 'visible' or 'hidden' |
158
163
159
- ### isVisible(selector) ⇒ <code >boolean</code >
164
+ ## isVisible(selector) ⇒ <code >boolean</code >
160
165
161
166
** Kind** : inner method of [ <code >js-css-animations</code >] ( #js-css-animations )
162
167
** Returns** : True if the element is visible, False otherwise
@@ -165,7 +170,7 @@ Verifies if a given element is hidden or visible
165
170
| -------- | ------------------------------------------- | ----------------------------------- |
166
171
| selector | <code >Element</code > \| <code >string</code > | Dom element or a valid CSS selector |
167
172
168
- ### isHidden(selector) ⇒ <code >boolean</code >
173
+ ## isHidden(selector) ⇒ <code >boolean</code >
169
174
170
175
** Kind** : inner method of [ <code >js-css-animations</code >] ( #js-css-animations )
171
176
** Returns** : True if the element is hidden, False otherwise
0 commit comments