has anyone had any experience with the 'ImageFade' JavaScript that's often used in image galleries on websites? I have made my own gallery script into my website ( See: http://www.sychosis.com/?p=gallery ) - and im doing some final tweaks, and would love to have ImageFade (or similar) on the images, just as a 'finishing touch' so any help would be greatly appreciated ;)
It would break w3c standards.
This should point you in the right direction, just apply it to your image tag.
http://www.quirksmode.org/css/opacity.html
You just need a timer and the javascript to call is here
function setOpacity(value) {
testObj.style.opacity = value/10;
testObj.style.filter = 'alpha(opacity=' + value*10 + ')';
}
taken from http://www.quirksmode.org/js/opacity.html
I would like a loading image and/or overlay to be displayed before/while the image fades if possible.. though im sure I could do that with CSS 'background' tag
ImpInaBox
23-01-2008, 07:58
I rolled my own fade/dissolve here (http://www.impinabox.co.uk) and several other places by placing an initially transparent image (opacity/-moz-opacity/alpha = 0) over the top of an existing image then increasing the opacity gradually, over half a second or so, by a function called from a timer. When it's got to 100% I change the src for the original pic to match the new one and remove the overlaid image - ready for the next fade. It's perfectly standards compliant as far as the HTML goes but W3C gets a bit snotty about the alpha filter in the CSS.
I rolled my own fade/dissolve here (http://www.impinabox.co.uk) and several other places by placing an initially transparent image (opacity/-moz-opacity/alpha = 0) over the top of an existing image then increasing the opacity gradually, over half a second or so, by a function called from a timer. When it's got to 100% I change the src for the original pic to match the new one and remove the overlaid image - ready for the next fade. It's perfectly standards compliant as far as the HTML goes but W3C gets a bit snotty about the alpha filter in the CSS.
thats nice, but im not wanting it to go one image to the next in a slide show style, the gallery shows thumbnails, and when you click a thumb, It will bring it to a larger view with "<< Prev Next >>" buttons at the top, and the image in a larger view in the middle, some of the images could be a large file size and I simply want a "Loading" thing to show (like a 3kb gif image of just text or something) then once the image has loaded its fades in..
Have a look @ lightbox (http://www.huddletogether.com/projects/lightbox/):thumbsup:.
Have a look @ lightbox (http://www.huddletogether.com/projects/lightbox/):thumbsup:.
That's perfect, Just the one I was after, Thanks! xD
SpeedwayDan
23-01-2008, 18:07
That's perfect, Just the one I was after, Thanks! xD
yep it's great, i use it alot
Phanerothyme
24-01-2008, 00:59
mootools and scriptaculous are worth a look too, especially for non-javascript people like me.