Hello here is my code : var one = 0; var two = 0; var three = 0; var free = 1; function open() {
if ($('#one').is(':visible')) {
one = 1;
}
else {
one = 0;
free = 1;
}
if ($('#two').is(':visible')) {
two = 1;
}
else {
two = 0;
if (one == 1) {
free = 2;
}
}
if ($('#three').is(':visible')) {
three = 1;
}
else {
three = 0;
if (one == 1 && two == 1) {
free = 3;
}
}
}
and then in the HTML part
<body onload="javascript:window.setInterval('open()', 1000)">
Now the layers one two and three are hidden by default. Now the problem is, at first the HTML output ( in Layer 7) is 1 (value of free) . But after one second it changes to 2. Shouldn't it remain the same? This is as all the layers have the same visibility(hidden) at each point in time...