-
Notifications
You must be signed in to change notification settings - Fork 0
/
pix.js
37 lines (32 loc) · 986 Bytes
/
pix.js
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
var position=1;
function prev(){
changeout(position);
setTimeout("changein(position)", 500);
var befo=position;
setTimeout(function(){document.getElementById(befo).style.display="none";}, 450);
position--;
if(position==0)
{
position=maxpos;
}
document.getElementById("control").innerHTML=""+position+"/"+maxpos;
}
function next(){
changeout(position);
setTimeout("changein(position);", 450);
var befo=position;
setTimeout(function(){document.getElementById(befo).style.display="none";}, 450);
position++;
if(position==maxpos+1)
{
position=1;
}
document.getElementById("control").innerHTML=""+position+"/"+maxpos;
}
function changein(id) {
document.getElementById(id).style.display="";
setTimeout(function(){document.getElementById(id).style.opacity="1";}, 50);
}
function changeout(id) {
document.getElementById(id).style.opacity="0";
}