Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
function getElementsByClassName(classToFind, baseElement) {
if (arguments.length == 1) {
baseElement = document; // Assume whole document if no base element passed in
} else if (!baseElement) {
return([]); // If base element is passed in and doesn't exist, return empty array
}
var tempElements = baseElement.getElementsByTagName('*');
// getElementsByTagName('*') doesn't work in IE 5.0/Win or IE 5.5/Win... so use this as a backup
if (!tempElements.length && baseElement.all) tempElements = baseElement.all;
var matchingElements = [];
for (var loop=0; loop<tempElements.length; loop++) {
if ((' ' + tempElements[loop].className + ' ').indexOf(' ' + classToFind + ' ') != -1) {
matchingElements[matchingElements.length] = tempElements[loop];
}
}
return(matchingElements);
}