finpudse dette script
Heyjeg har fundet dette script som virker fint man jeg vil høre om det kan lade sig at gør at finpudse f.eks. når man klikker på et billede så bliver billedet forstørret op hvor der så vil være link til næste og tilbage billede og så tænkte jeg at når man klikker på billede vil man komme tilbage til galleriet :-)
håber at det er en der kan hjælpe ;-)
god søndag
<head>
<style type="text/css">
.slideshow{ /*CSS for DIV containing each image*/
float: left;
width: 200px;
height: 200px;
}
.slideshow img{ /*Change "auto" below to a number (ie: 200px) to hard code dimensions of album images*/
width: 174px;
height: 146px;
}
#navlinks{ /*CSS for DIV containing the navigational links*/
width: 400px;
}
#navlinks a{ /*CSS for each navigational link*/
margin-right: 8px;
margin-bottom: 3px;
font-size: 100%;
}
#navlinks a.current{ /*CSS for currently selected navigational link*/
background-color: yellow;
}
</style>
<script type="text/javascript">
/***********************************************
* Photo Album script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/
var dimension="3x2" //Specify dimension of gallery (number of images shown), such as 4x2, 3x1 etc
//Specify images:
//galleryarray[x]=["path_to_image", "optional_title_attribute", "optional_text_description", "optional_link"]
var galleryarray=new Array()
galleryarray[0]=["photo1.jpg", "optional412313213132123 title", "optional description", "optional url"]
galleryarray[1]=["photo2.jpg", "optional title", "optional description", "optional url"]
galleryarray[2]=["photo3.jpg", "optional title", "optional description", "optional url"]
galleryarray[3]=["photo4.jpg", "optional title", "optional description", "optional url"]
galleryarray[4]=["photo5.jpg", "optional title", "optional description", "optional url"]
galleryarray[5]=["photo6.jpg", "optional title", "optional description", "optional url"]
galleryarray[6]=["photo7.jpg", "optional title", "optional description", "optional url"]
galleryarray[7]=["photo8.jpg", "optional title", "optional description", "optional url"]
galleryarray[8]=["photo9.jpg", "optional title", "optional description", "optional url"]
galleryarray[9]=["photo10.jpg", "optional title", "optional description", "optional url"]
galleryarray[10]=["photo11.jpg", "optional title", "optional description", "optional url"]
var href_target="_new" //Enter target attribute of links, if applicable
var totalslots=dimension.split("x")[0]*dimension.split("x")[1]
function buildimage(i){
var tempcontainer=galleryarray[i][3]!=""? '<a href="'+galleryarray[i][3]+'" target="'+href_target+'">' : ""
tempcontainer+='<img src="'+galleryarray[i][0]+'" border="1" title="'+galleryarray[i][1]+'">'
tempcontainer=galleryarray[i][3]!=""? tempcontainer+'</a>' : tempcontainer
tempcontainer=galleryarray[i][2]!=""? tempcontainer+'<br \/>'+galleryarray[i][2] : tempcontainer
return tempcontainer
}
function jumptopage(p){
var startpoint=(p-1)*totalslots
var y=1;
for (i=0; i<totalslots; i++){
document.getElementById("slide"+i).innerHTML=(typeof galleryarray[startpoint+i]!="undefined")? buildimage(startpoint+i) : ""
}
while(document.getElementById("navlink"+y)!=null){
document.getElementById("navlink"+y).className=""
y++
}
document.getElementById("navlink"+p).className="current"
}
var curimage=0
for (y=0; y<dimension.split("x")[1]; y++){
for (x=0; x<dimension.split("x")[0]; x++){
if (curimage<galleryarray.length)
document.write('<div id="slide'+curimage+'" class="slideshow">'+buildimage(curimage)+'</div>')
curimage++
}
document.write('<br style="clear: left" />')
}
</script>
<!--Below HTML code refers to the navigational links for the gallery-->
</head>
<div id="navlinks">
<script type="text/javascript">
for (i=1; i<Math.ceil(galleryarray.length/totalslots)+1; i++)
document.write('<a id="navlink'+i+'" href="java script:jumptopage('+i+')\">Side '+i+'</a> ')
document.getElementById("navlink1").className="current"
</script>
</div>
