guitardave78
Programmer
Ok i have the following script
No I thought that
el.style.width = Element.Width(id)-1 + "px"
Would subtract 1 from the width each time. But it seems to add 1 to the width,
Help!!
}...the bane of my life!
Code:
function shrinkWidth(id,endWidth,speed){
el = document.getElementById(id);
if(Element.Width(id) > endWidth){
w = Element.Width(id)
el.style.width = Element.Width(id)-1 + "px";
document.getElementById('debug').innerHTML = el.style.width;
var sw = setTimeout(function(){shrinkWidth(id,endWidth,speed)},1);
}
}
No I thought that
el.style.width = Element.Width(id)-1 + "px"
Would subtract 1 from the width each time. But it seems to add 1 to the width,
Help!!
}...the bane of my life!