[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Scriptaculous Toggle effect performance in IE

Posted on 2007-08-08
5
Medium Priority
?
307 Views
Last Modified: 2008-01-09
Hello,

I'm using the scriptaculous toggle effect and it seems to hesitate for a few seconds when I first click on a link only in IE. After I click it once every level to click is fine. In Mozilla it loads just fine. Page loads and I select the first category and wa la it pops down instantly. Please let me know what I can do to solve this issue with IE.

Thanks,

Brian
0
Comment
Question by:brihol44
5 Comments
 
LVL 75

Assisted Solution

by:Michel Plungjan
Michel Plungjan earned 200 total points
ID: 19660037
Show your code, please
0
 
LVL 3

Assisted Solution

by:skumara_samy
skumara_samy earned 600 total points
ID: 19660821
Check your javascript console , you got any errors before u click on the toogle link...

if still the error comes , plz specify on which style u face a problem ..(Slide , Blind or appear ) and post your
code..
0
 
LVL 16

Accepted Solution

by:
LeeKowalkowski earned 1200 total points
ID: 19662062
IE doesn't have a JavaScript console as such, and if there are errors it would be more likely to fail completely rather than be slow.

IE's DOM Collections are rather slow, for example, querying the length of a collection like this:
  var children = element.childNodes;
  for(var i = 0; i < children.length; i++)

... is very bad for performance in IE.  This is significantly faster:
  var children = element.childNodes;
  var childrenLength = children.length;
  for(var i = 0; i < childrenLength; i++)

This is because a DOM Collection is "live" - even when returned from document.getElementsByTagName(...).  Every time you query the length it is recalculated in case there have been any changes to the DOM.

--
Lee
0
 

Author Comment

by:brihol44
ID: 19663954
Hello LeeKowalkowski,

So would I change this code in the scriptaculous files? Possibly the prototype.js file? or somewhere else?

Thanks,

Brian
0
 
LVL 16

Expert Comment

by:LeeKowalkowski
ID: 19665416
I wouldn't know if you didn't show us your code.

--
Lee
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ready to get certified? Check out some courses that help you prepare for third-party exams.
Strategic internal linking is often considered an SEO power technique, especially for content marketing. Do you need to hire an SEO agency to optimize you internal linking? No, this article will help you understand the basics of internal linking and…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses
Course of the Month20 days, 7 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question