Im trying to make a portfolio and on my index page I have a bunch of divs containing thumbnails. When you click on the div it changes its class from .thumb to .large and it replaces its content with a div from a separate html file with "large" in the name. This works in firefox, chrome, safari, and IE9 but not in any of the earlier versions of IE. Can anyone tell me why or please offer suggestions for me to try? I'm not a very good coder, so any help would be greatly appreciated.
function divClicked(divId, divSource)
{
if ($("#"+divId).hasClass("thumb"))
{
for (index = 0; index < divArray.length; index++)
{
if ($(divArray[index]) != "#"+divId)
{
if ($(divArray[index]).hasClass("largeDiv"))
{
$(divArray[index]).removeClass("largeDiv");
$(divArray[index]).addClass("thumb");
var divName = divArray[index] ;
divName = divName.substr(1, divName.length);
divName = divName + 'thumb.html' + ' #thumbDiv'
$(divArray[index]).load(divName);
}
}
}
$("#"+divId).removeClass("thumb");
$("#"+divId).addClass("largeDiv");
var loadStr = divId + "large.html " + divSource;
$("#"+divId).load(loadStr);
}