473,503 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ie slowing down moving elements help

3 New Member
created a newscroller in javascript that moves a <ul> from article to article. works fine in firefox but slow in ie. i stripped out everything but the movement to find out ie actually slows the movement down after a bit. for example say the ul is moving 4px per tick after 20px it starts moving at 2px. heres my code:

Expand|Select|Wrap|Line Numbers
  1. document.getElementById("prev").onclick=function(){nextItem("prev")};
  2. document.getElementById("next").onclick=function(){nextItem("next")};
  3. var storyModule=document.getElementById("story_module");
  4. var elmUL=storyModule.getElementsByTagName("ul")[0];
  5. function nextItem(direction){
  6. var pos=elmUL.offsetLeft;
  7. var newpos;
  8. newpos=pos-2;
  9. elmUL.style.left=newpos+"px";
  10. setTimeout("nextItem()",10);}
  11.  
any idea how to get it running at a constant speed in ie???
Oct 6 '10 #1
1 1216
acoder
16,027 Recognized Expert Moderator MVP
Perhaps 10ms is too small. Try setInterval instead. The constant rendering at a fast rate is possibly an issue for IE, so you could try making it 100 milliseconds instead.
Oct 8 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

16
9885
by: TheKeith | last post by:
I'm writing a script with a while loop in it. How can I get it to go slower so that it doesn't appear to happen all at once--so that it looks animated--basically. I tried the setTimeout(500) in the...
0
697
by: Roy | last post by:
Hi all, Last couple weeks I have been experiencing a time consuming debugging, since F11 is not moving fast from one line to another. I haven't made any changes to project or exception properties....
3
1785
by: Dan Stromberg | last post by:
I have two different python programs that are slowing down quite a bit as their memory use goes up. I'm not really sure if this is some sort of CPU cache effect, or if it's something about...
7
1705
by: Chris Thompson | last post by:
Hi All, I have a private website created using HTML/PHP. Within this site, there is a page that has a form (question.php), which is populated depending on the question number that has been...
7
2569
by: davidst95 | last post by:
Hello, I have a program that runs a long process. I tried to add a thread to check if the use hit a cancel button to abort the process. Dim t As Threading.Thread t = New...
2
1930
by: phauwn | last post by:
I have the following code which i use to fadeout 18 elements on mouseout, which works great on 1 element, but soon begins to slow down, or fail as I mouse over and off of the additional objects.......
1
1659
by: =?Utf-8?B?QWRwcm9m?= | last post by:
Since I installed OneCare I have noticed my computer slowing down significantly. Has anyone else experieced this?
3
1939
by: karl98 | last post by:
Does anyone else experience slowing down of a web conferencing session when 5 or more people join in the meeting? Our web conferences slow down considerably and are driving me nuts.
0
1261
by: shale | last post by:
Hi, I have an ASP scripted business web application connected to a SQL 2000 server, that suddenly after a few hours is slowing down. it becomes so slow it can take up to a minute to load each...
3
2843
by: Echosei | last post by:
Hi there, I recently purchased an HP pavillon dv3 -CORE i7 -Windows 7 premium -300GB Harddrive -2GB RAM PROBLEM: The whole system slows down exceedingly everytime I use it. I think it's...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7076
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.