domC-text

domC with text node included, a dom control library.(broswer only)


Keywords
dom, html
Install
bower install domC-text

Documentation

domC-text

Some useful dom control function included text node.

Another version that will filter text node is domC

Install

bower install domC-text

Required packages

API

Single node

domC_text.countPreSibling(element)

return previous sibling amount

domC_text.previousSibling(element)

return previousSibling

domC_text.previousSiblingArr(element)

return all previousSibling in an array

domC_text.countNextSibling(element)

return nextSibling amount

domC_text.nextSibling(element)

return nextSibling

domC_text.nextSiblingArr(element)

reutrn all nextSibling in an array

Compair two nodes

domC_text.isPreviousSibling(first node, second node)

check if the first node is the second's previousSibling

domC_text.isNextSibling(first node, second node)

check if the first node is the second's nextSibling

domC_text.isSibling(first node, second node)

check if the first and the second is sibling

Test

Jasmine test

Develop

bower install

To install some required packages.

License

MIT (Lijung Chi)@chilijung