just why can't this work. I've used many scripts and can't figure out why this wont work. I think the script doesn't like the ct++ and ct--
in the head
var ct=50;
var vis=0;
function show(contain){
var van = document.getElementById(contain).style.display;
var heit=document.getElementById(contain).style.height;
document.getElementById(contain).style.height.ct+'px';
ct++;
if (ct==51){
document.getElementById(contain).style.display="block";
if (ct<140)
setTimeout('show()',10);
}
function revers() {
van = document.getElementById(contain).style.height=ct+'px';
ct--;
if (ct<6)
document.getElementById(contain).style.display='none';
if (ct>5)
setTimeout('revers()',0);
}
in the body
<div id="contained" class="linkem" onclick="show('vanish')" >
on a side note if I also wanted to count up or down the opacity and I know the fliters and ways browsers use opacity how can I attach it to the ct-- ct++
so it toggles opacity as well.



Reply With Quote

Bookmarks