-
Notifications
You must be signed in to change notification settings - Fork 2
/
codyhouse-snippets-js.json
58 lines (58 loc) · 1.4 KB
/
codyhouse-snippets-js.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
"addClass": {
"prefix": "addClass",
"body": [
"Util.addClass(${1:element}, '${2:className}');"
],
"description": "add a class (or list of classes) to an element"
},
"removeClass": {
"prefix": "removeClass",
"body": [
"Util.removeClass(${1:element}, '${2:className}');"
],
"description": "remove a class (or list of classes) from an element"
},
"hasClass": {
"prefix": "hasClass",
"body": [
"Util.hasClass(${1:element}, '${2:className}');"
],
"description": "check if element has a specified class"
},
"toggleClass": {
"prefix": "toggleClass",
"body": [
"Util.toggleClass(${1:element}, '${2:className}', ${3:bool});"
],
"description": "add or remove class (or list of classes) from an element"
},
"cssSupports": {
"prefix": "supports",
"body": [
"Util.cssSupports('${1:display}', '${2:block}');"
],
"description": "add or remove class (or list of classes) from an element"
},
"focus": {
"prefix": "focus",
"body": [
"Util.moveFocus(${1:element});"
],
"description": "move focus to a different element"
},
"children": {
"prefix": "children",
"body": [
"Util.getChildrenByClassName(${1:element}, '${2:className}');"
],
"description": "get children that have a specific class"
},
"index": {
"prefix": "index",
"body": [
"Util.getIndexInArray(${1:array}, ${2:element});"
],
"description": "index of a node element in an array"
}
}