Skip to content

madmanlear/Vanilla-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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")

About

Replacing oft-used jQuery methods with simple js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published