1.0.3 • Published 2 years ago

owldom v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago
<script src="owldom.js" />

<script>

var domBoy = new OwlDOM();

/// prototype of `grabElement()`
.grabElement(__TAG_NAME__, __ID__, __CLASS_LIST__)

// below all are optionals, only one can give as expected
// __TAG_NAME__: h1, h3, div, etc.
// __ID__: id attribute of any element like foo, bar etc
// __CLASS_LIST__: [] classNames in array

// to get all elements as a array even childs
console.log(domBoy.grabElement('*'));

// to get h1 + element with specified Id + elements array with specified classNames
console.log(domBoy.grabElement('h1', 'unique-h2'), ['class1', 'class2']);
</script>