Hi,
I have the following that works in Chrome and and older (recent) version of Firefox.
It marginally works in the latest Firefox and not at all in IE9:
[CODE]
function enlargePic() {
var alldivs = document.getElementsByClassName(‘listItem’);
var el, i = 0, howmany = 0;
while (el = alldivs.item(i++)) {howmany++};
var item = “<?= $Itemid ?>”;
if (howmany >= 1 && item !=360){
var bigPic1 = document.getElementsByClassName(‘myThumb’)[0];
var bigDiv1 = document.getElementsByClassName(‘listItem’)[0];
var subDiv1 = document.getElementsByClassName(‘contentThumbnail’)[0];
bigPic1.setAttribute(“class”, “contentThumbnailBIG”);
bigDiv1.setAttribute(“class”, “listItemBIG”);
subDiv1.setAttribute(“class”, “contentThumbnailBIG”);
}
if (howmany > 17 && item != 360 ){
var bigPic2 = document.getElementsByClassName(‘myThumb’)[12];
var bigDiv2 = document.getElementsByClassName(‘listItem’)[12];
var subDiv2 = document.getElementsByClassName(‘contentThumbnail’)[12];
bigPic2.setAttribute(“class”, “contentThumbnailBIG”);
bigDiv2.setAttribute(“class”, “listItemBIGright”);
subDiv2.setAttribute(“class”, “contentThumbnailBIG”);
}
}
I’m a bit of a noob with JS so I’m probably missing some syntax somewhere.
Anyway, would appreciate any help you can give.
Thanx!
Mark