B
BKDotCom
Could someone point me in the right direction in this little learning
exercise?
The "animation" starts in ie, but never stops? Works fine in mozilla.
I'm baffled.
<SCRIPT type="text/javascript">
function pulse(e, go)
{
d = parseInt(e.style.paddingTop);
if ( typeof go != 'undefined' )
{
// start/stop called from onmouse
e.setAttribute('pulse',go);
if ( go == 1 )
{
d = -1;
e.style.borderTop='1px solid #000';
e.style.borderBottom='1px solid #000';
e.style.textDecoration='none';
e.style.overflow='hidden';
}
else {
e.style.border='0px solid #000';
e.style.padding='0px';
e.style.textDecoration='underline';
}
}
if ( e.getAttribute('pulse') == 1 )
{
if ( d > 4 )
d = -1;
e.style.paddingTop=[d+1]+'px';
e.style.paddingBottom=[d+1]+'px';
etemp = e;
setTimeout('pulse(etemp)',80);
}
}
</SCRIPT>
<A onMouseOver="pulse(this,1);" onMouseOut="pulse(this,0)"
HREF="#">groovy</A>
exercise?
The "animation" starts in ie, but never stops? Works fine in mozilla.
I'm baffled.
<SCRIPT type="text/javascript">
function pulse(e, go)
{
d = parseInt(e.style.paddingTop);
if ( typeof go != 'undefined' )
{
// start/stop called from onmouse
e.setAttribute('pulse',go);
if ( go == 1 )
{
d = -1;
e.style.borderTop='1px solid #000';
e.style.borderBottom='1px solid #000';
e.style.textDecoration='none';
e.style.overflow='hidden';
}
else {
e.style.border='0px solid #000';
e.style.padding='0px';
e.style.textDecoration='underline';
}
}
if ( e.getAttribute('pulse') == 1 )
{
if ( d > 4 )
d = -1;
e.style.paddingTop=[d+1]+'px';
e.style.paddingBottom=[d+1]+'px';
etemp = e;
setTimeout('pulse(etemp)',80);
}
}
</SCRIPT>
<A onMouseOver="pulse(this,1);" onMouseOut="pulse(this,0)"
HREF="#">groovy</A>