domy-children
Manipulate children of DOM elements. For use with Browserify.
Part of the Domy module collection.
Install
npm install domy-children --save
Usage
var chidren = ; ;;;;
Methods
children(element)
element
- string, css selector, or DOM element
Creates and returns an object with the following methods available:
remove
first
last
count
at
Instance Methods
remove(selector)
Remove all children with the following selector
selector
- DOM element or css selector
first()
Get the first child node
last()
Get the last child node
at(index)
Get child at index
index
- index of child node to return
count(element)
Get number of child nodes
Run Tests
Requires Phantomjs is installed
npm install
npm test