selectjs

Helper function returning all elements in the DOM that matches a specified CSS selector


Keywords
query, querySelector, querySelectorAll, jquery, zepto, Node, NodeList, selector
License
MIT
Install
npm install selectjs@1.0.2

Documentation

queryselector.js

Helper function returning all elements in the DOM that matches a specified CSS selector. The function returns a single element when selector starts with a sign character: #foo. It returns a NodeList for all other cases.

Installation

$ npm i --save queryselector.js

Example

import $ from 'queryselector.js';

let myFoo = $('#foo');

// A convenience method is added to the Node and NodeList prototypes:
let myBar = myFoo.$('.bar');