...

View Full Version : setTimeout issue maybe



chump2877
01-03-2007, 12:36 AM
I'm trying to figure out why the tab on the left side of this page:

http://www.mediamogulsweb.com/client/parseXML/

is moving sooooo slow when clicked on....I have the timeout set to 2 milliseconds, and it's still that slow....

i noticed that this started happening about the time when I added this line of code:


document.body.style.paddingLeft = g + 'px';

inside the slideTab function....

what gives? thanks.

Arty Effem
01-03-2007, 03:13 AM
I'm trying to figure out why the tab on the left side of this page:

http://www.mediamogulsweb.com/client/parseXML/

is moving sooooo slow when clicked on....I have the timeout set to 2 milliseconds, and it's still that slow....

i noticed that this started happening about the time when I added this line of code:


document.body.style.paddingLeft = g + 'px';

inside the slideTab function....

what gives? thanks.You're calling it far too often. I wouldn't do that more than about 5 times per second, not 500.
Also you're generating an error in Moz and Opera.

chump2877
01-03-2007, 03:20 AM
I'm not getting any errors in Mozilla's JS console....As far as Opera is concerned, well :D....

I'll try to alter the body padding less frequently and see if that helps....

thanks...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum