noquery
v0.0.3
Published
General-purpose library written in vanilla JS
Downloads
6
Maintainers
Readme
NoQuery
This project is intended to ease the use of simple JS functionalities and minimize code.
- No dependencies
- AMD, Node & browser ready
Install
You can install it with :
npm install noquery --save
Selectors
// get by id
S('#iddiv');
// get by class name
S('.classdiv');
// get by element name
S('@namediv');
// get by element tag name
S('=div');
// get element by query selector
S('*div div.inside');
// getAttribute of name
S('#iddiv').getAttribute('name');
// getAttribute of name from nodelist
S('.classdiv')[0].getAttribute('name');
Elements
// executes callback if the selector exists
NQ.exists( selector , callback );
Validation
// returns true/false based on the given param
NQ.isEmail( emailID )