@verndale/bling.js
v2.1.0
Published
Because you want the $ of jQuery without the jQuery
Downloads
20
Readme
bling.js
Because you want the $ of jQuery without the jQuery
Originally created by Paul Irish modified by Verndale.
Usage
NPM installation
npm i @verndale/bling.js
Yarn installation
yarn add @verndale/bling.js
JS
import "@verndale/bling.js"
Docs
| Vanilla JavaScript | bling.j s |
| -------------------------------------------------------------------------- | ------------------------------------- |
| document.querySelector('selector')
| _$('selector')
|
| node.querySelector('selector')
| node._$('selector')
|
| document.querySelectorAll('selector')
| _$$('selector')
|
| node.querySelectorAll('selector')
| node._$$('selector')
|
| Array.from(document.querySelectorAll('selector')).filter(callback)
* | _$$('selector').filter(callback)
* |
| window.addEventListener('eventName', callback)
| window._on('eventName', callback)
|
| node.addEventListener('eventName', callback)
| node._on('eventName', callback)
|
| nodeList.forEach((node) => node.addEventListener('eventName', callback))
| nodeList._on('eventName', callback)
|
* All array methods are available by default