Skip to content

Niftproj/owldom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

OWLDOM

Do not mess with DOM/Markups (WORK IN PROGRESS.)


Usage :

<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>