troubleshooting Question

Problem with Scriptaculous effect

Avatar of aznprncritic
aznprncritic asked on
JavaScript
1 Comment1 Solution205 ViewsLast Modified:
I'm using the following script to animate some rollovers:

Effect.divSwap = function(element,container){
    var div = document.getElementById(container);
    var nodeList = div.childNodes;
    var queue = Effect.Queues.get('menuScope');

    if(queue.toArray().length<1){
        if(Element.visible(element)==false){
            for(i=0;i<nodeList.length;i++){
                if(nodeList.item(i).nodeName=="DIV" && nodeList.item(i).id!=element){
                    if(Element.visible(nodeList.item(i))==true){
                        Effect.Fade(nodeList.item(i),{queue:{position:'front',scope:'menuScope',limit:1}})
                    }
                }
            }
            Effect.Appear(element,{queue:{position:'end',scope:'menuScope',limit:2}})
       }
   }
}

Here's the HTML i'm using:

<div id="localNavContainer">
    <ul id="localNav">
      <li id="simplicity"><a href="choose-simplicity.php" onmouseover="Effect.divSwap('simplicity-hero','centerCol');" title="Simplicity"></a></li>
      <li id="style"><a class="selected" href="choose-style.php" onmouseover="Effect.divSwap('style-hero','centerCol');" title="Style"></a></li>
      <li id="performance"><a href="choose-performance.php" onmouseover="Effect.divSwap('performance-hero','centerCol');" title="Performance"></a></li>
    </ul>
    <div><img src="img/bg/largedivider.jpg" width="881" height="35" alt="" /></div>
  </div>

The problem I'm having is that in IE, when I rollover the items, the effect will only fire *most of the time* but not everytime.  Am I missing something here?
ASKER CERTIFIED SOLUTION
system_down

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros