All of a sudden this JS error started popping up after the latest template upgrade on the events page of my site.
http://www.inthenola.com/events.html
- Code: Select all
TypeError: el[i] is undefined
from this line of code:
- Code: Select all
//changes for module in jomsocial position
if(document.getElements('.moduletable')){
var el = document.getElements('.moduletable');
var tab = document.getElements('.moduletable h3');
for (var i=0; i < tab.length; i++) {
tab[i].addClass('header').innerHTML = '<span>'+ tab[i].get('html')+'</span>';
el[i].removeClass('moduletable').addClass('box').innerHTML = '<div>'+ el[i].get('html')+'</div>';
Uncaught TypeError: Cannot call method 'removeClass' of undefined
}
}
At first I thought it was another extension causing the error but upon further investigation it's definitely coming from the template.
Thanks for your help in resolving this issue.