1) Script Title: Image Thumbnail Viewer II
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...thumbnail2.htm
3) Describe problem: Not a problem really - just an edit and I suck as js. I want the "title" text, which is being used as a description, to show above the image, not below like how it is scripted. I think this is the section I need to look at:
I have done no editing to the original js file - I tried fumbling around in it to change it to the top to no avail. I really don't know what I'm looking at with this one.Code:loadimage:function(linkobj){ var imagepath=linkobj.getAttribute("href") //Get URL to enlarged image var showcontainer=document.getElementById(linkobj.getAttribute("rev").split("::")[0]) //Reference container on page to show enlarged image in var dest=linkobj.getAttribute("rev").split("::")[1] //Get URL enlarged image should be linked to, if any var description=(thumbnailviewer2.enableTitle && linkobj.getAttribute("title"))? linkobj.getAttribute("title") : "" //Get title attr var imageHTML='<img src="'+imagepath+'" style="border-width: 0" />' //Construct HTML for enlarged image if (typeof dest!="undefined") //Hyperlink the enlarged image? imageHTML='<a href="'+dest+'">'+imageHTML+'</a>' if (description!="") //Use title attr of the link as description? imageHTML+='<br />'+description if (this.iefiltercapable){ //Is this an IE browser that supports filters? showcontainer.style.filter=this.iefilterstring showcontainer.filters[0].Apply() }
The original js file is this: http://www.dynamicdrive.com/dynamici...nailviewer2.js



Reply With Quote

Bookmarks