first commit

This commit is contained in:
Sam Keddy
2019-03-26 23:20:54 +00:00
commit 7126e83f5f
67 changed files with 9722 additions and 0 deletions

View File

@ -0,0 +1,14 @@
//add event listener to each of specified element's children
function onChildren(event, parentElement, functionCallback) {
console.log('onChildren()');
var parentElement = (typeof parentElement == 'string' ? document.getElementById(parentElement) : parentElement);
var children = parentElement.children;
//loop through children and add onClick listener
for (var i = 0; i < children.length; i++) {
on(event, children[i],functionCallback);
}
}