I am using IE8 and am receiving an error of “object not found” with the line:
var l_classList = $(this).attr('class').trim().split(/\s+/);
The actual code block is as follows:
$( "div.panel" ).each(function(index) {
var l_classList = $(this).attr('class').trim().split(/\s+/);
if ( l_classList.length == 1 ) $(this).addClass("panel-default");
});
Any ideas of how to get around this within IE8?