Hello all, i’ve got a gallery of thumbnails with an onclick event attached to them. when you click a thumbnail a larger image of that thumbnail pops up overtop all the thumbs which inturn have their opacity set to 10%…click the big image and it disappears and the thumbs return to 100%.
this works in IE (of course ? ) but not in FF. nothing happens when i click a thumbnail. below is the code for the big pic, the thumbs have the same onclick() code attached, only they send ‘block’ instead of ‘none’.
[CODE]
<div id=”big_pic_div”><img src=”just_bg.jpg” width=”334″ height=”203″ hspace=”2″ vspace=”2″ onclick=”big_pic(‘none’)” /><br />
Click Photo To Close</div>
here is my javascript:
[CODE]
function big_pic(state){
dim = “alpha(opacity=10);” // for IE
undim = “alpha(opacity=100);” // for IE
moz_dim = “0.4”; // for MOZ
moz_undim = “1”; // for MOZ
if (state == “block”){
// ‘content’ is the div that contains the thumbs!
content.style.filter = dim; // sets thumb opacity to 10 – IE
content.style.MozOpacity= moz_dim; // sets thumb opacity to 10 – MOZ
big_pic_div.style.display = state; // sets display of larger pic
big_pic_div.style.filter = undim; // keeps nested big_pic_div from inheriting ‘content’ opacity – I THINK!
big_pic_div.style.MozOpacity = moz_undim; // MOZ version of above
} else {
content.style.filter = undim;
content.style.MozOpacity = moz_undim;
big_pic_div.style.display = state;
}
}
thanks guys!