0.0.7 • Published 9 years ago
rkgttr-q v0.0.7
rkgttr-q
DOM elements selector shortcuts.
How to Install
$ npm install rkgttr-q --save-devor
$ yarn add rkgttr-q --devGetting Started
Q is a module that consists of shortcuts to select DOM elements. For example instead of typing document.querySelectorAll('selector') you just have to type Q.all('selector'). Following is the list of Q methods:
one: shortcut fordocument.querySelectorall: shortcut fordocument.querySelectorAllid: shortcut fordocument.getElementByIdclassname: shortcut fordocument.getElementsByClassNametag: shortcut fordocument.getElementsByTagNameAll methods, except
Q.idcan have a second optional parameters, which should be aNodeobject, that is the context from where you want to perform the query. For example:
import * as Q from 'rkgttr-q';
Q.all('li'); // return all list elements in the document
Q.all('li', Q.one('ul.todo')); // return all list elements into the .todo listLicense
MIT © 2016 Erik Guittiere