Skip to content
/ jShit Public

The last library for dirty DOM manipulations if you cannot avoid that.

Notifications You must be signed in to change notification settings

egoist/jShit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jShit 💩

🚧 WIP. The last library for dirty DOM manipulations if you cannot avoid that.

Install

First:

npm install jshit --save

Then:

// using CommonJS and Webpack with babel-loader
import { $, $$, dom } from 'jshit'

// loaded directly from CDN
// $/$$/dom ... will be automatically exposed as global vars.

API

  • $(element)

  • $$(elements)

    $/$$ is just a shorthand for document.querySelector/document.querySelectorAll

  • dom.find(element)

    like dom('.list').find('li')

  • dom.each(fn)

  • dom.attr(key[, value])

  • dom.addClass(classList)

  • dom.removeClass(classList)

  • dom.toggleClass(classList)

  • dom.append/prepend(html)

License

MIT.

About

The last library for dirty DOM manipulations if you cannot avoid that.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published