Basic javascript functionality to be used in other projects
Function List
- isFunction(objToCheck) - checks to see if a javascript object is a function.
- getRandomInt(min, max) - gets a random integer within the range specified by min and max
- floorTrunc(num, numDecimals) - truncates a floating point number to a specified number of decimal places
- compArrs(arrA, arrB) - checks whether to arrays are equal in length and items
- compSubArr(arrA, arrB) - checks whether arrA is a contained with (is a sub array) of arrB
- empty(element) - removes all children with a DOM element
- classCheck(element, classesToCheck) - checks whether a DOM element has one or more specified classes
- addClass(element, classesToAdd) - add one or more specified classes to a DOM element
- removeClass(element, classesToRemove) - removes one or more specified classes from a DOM element
- toggleClass(element, classesToToggle) - toggles one or more specified classes on a DOM element
- modifyMultiple(elements, process) - executes a specific function on multiple elements
- bindMultiple(element, event, handler) - binds event handler for specific event to multiple elements