-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathREADME
More file actions
25 lines (21 loc) · 723 Bytes
/
README
File metadata and controls
25 lines (21 loc) · 723 Bytes
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
This is a small class for replicating the most often-used (by me, at least) jQuery functionality in 2kb. Examples in the index.html file.
NOT READY FOR USE IN DEVELOPMENT
Includes:
* Find elements
* Create element
* Update attributes for element
* Iterate through elements with callback
* Bind events with callback
* Empty children from element
* Load script
* Get and set text from element
* Doc Ready
Other useful shortcuts build into js:
parent = element.parentNode
clone = element.cloneNode(true)
next = element.nextSibling
html = element.innerHTML
addClass = element.classList.add("foo")
removeClass = element.classList.remove("foo")
toggleClass = element.classList.toggle("foo")
attr = element.getAttribute("foo")