-
Ultimate Fade-in slideshow image width
1) Script Title: Ultimate Fade-in slideshow (v1.5)
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm
3) Describe problem: (Not a problem, but a "tweak-possible" question): Is it possible somehow to specify a new 'virtual' width for each image in the slideshow? That is, my script might draw upon a directory of images that are all say, 600px wide, but can I specify in the js somehow that they should appear at a smaller size, say, 400px wide (like doing "width="400" in HTML)?
-
-
As the script is written, you would have to modify it. If you only have one show on the page, it is easier to just go here:
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img width="400" src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
and add in the width that you want as shown above in red.
If you have more than one slide show on the page and each slide show needs a different width set, it can be done but is a little more complicated. Let me know if you need that. You are better off (for many reasons) resizing your images in an image processing program.
-
-
Brilliant!
I do have only one slideshow on the page in question, and the change is indeed only from 600px to 400px wide, so I don't think there's much overhead.
Thank you very much! That's brilliant!
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks