Ik gebruik volgend script in een fotoboek. Als je dan op een foto klikt wordt automatisch een popupje geopend met de foto erin. Maar nu wil ik als er op een foto geklikt wordt en het popupje staat nog open dat het dan weer naar voren komt.
Ik weet niet of dit echt een duidelijke uitleg is... zo niet hoor ik het wel.
Script:
Ik weet niet of dit echt een duidelijke uitleg is... zo niet hoor ik het wel.
Script:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
| <script name="Zoom Browser Window" language="javascript">
<!--
var zBox,zStep=0,zLink
function doZoom() {
zStep+=1;zPct=(10-zStep)/10
if (document.layers) {
zBox.moveTo(toX+zPct*(fromX-toX),toY+zPct*(fromY-toY));
zBox.document.open();
zBox.document.write("<table width='"+maxW*(1-zPct)+"' height="+maxH*(1-zPct)+" border=2 cellspacing=0><tr><td></td></tr></table>");
zBox.document.close();
}else{
zBox.style.border="2px solid #999999";
zBox.style.left=toX+zPct*(fromX-toX);
zBox.style.top=toY+zPct*(fromY-toY);
zBox.style.width=maxW*(1-zPct);
zBox.style.height=maxH*(1-zPct);
}
zBox.style.visibility="visible";
if (zStep < 10) setTimeout("doZoom("+fromX+","+fromY+","+toX+","+toY+")",30);
else{zBox.style.visibility='hidden';zStep=0;
if (zLink) {
var w=window.open(''+ zLink + '','zWindow','width='+maxW+',height='+maxH+',left='+adjX+',top='+adjY+','+ScllBr+',resizable');
}
}
}
function Lvl_Zoom(evt,zlink,maxw,maxh,tox,toy,scr) {
if (arguments.length > 2)
scrollH=(window.pageYOffset!=null)?window.pageYOffset:document.body.scrollTop;
maxW=maxw?maxw:window.innerWidth?innerWidth:document.body.clientWidth;
maxH=maxh?maxh:window.innerHeight?innerHeight:document.body.clientHeight;
toX=tox?tox:0;
toY=(toy?toy:0)+scrollH;
fromX=evt.pageX?evt.pageX:evt.clientX;
fromY=(evt.pageY?evt.pageY:evt.clientY)+(document.all?scrollH:0);
adjX=toX+evt.screenX-fromX;
adjY=toY+evt.screenY-fromY;
if (document.createElement && document.body.appendChild && !zBox) {
zBox=document.createElement("div");
zBox.style.position="absolute";
document.body.appendChild(zBox);
}else if (document.all && !zBox) {
document.all[document.all.length-1].outerHTML+='<div id="zBoxDiv" style="position:absolute"></div>';
zBox=document.all.zBoxDiv;
}else if (document.layers && !zBox) {
zBox=new Layer(maxW);zBox.style=zBox;
}if (scr == 'y'){ ScllBr = 'scrollbars=yes'}else{ScllBr = 'scrollbars=no'}
zLink=zlink;
doZoom();
}
//-->
</script> |