aznprncritic
asked on
Problem with Scriptaculous effect
I'm using the following script to animate some rollovers:
Effect.divSwap = function(element,container ){
var div = document.getElementById(co ntainer);
var nodeList = div.childNodes;
var queue = Effect.Queues.get('menuSco pe');
if(queue.toArray().length< 1){
if(Element.visible(element )==false){
for(i=0;i<nodeList.length; i++){
if(nodeList.item(i).nodeNa me=="DIV" && nodeList.item(i).id!=eleme nt){
if(Element.visible(nodeLis t.item(i)) ==true){
Effect.Fade(nodeList.item( i),{queue: {position: 'front',sc ope:'menuS cope',limi t:1}})
}
}
}
Effect.Appear(element,{que ue:{positi on:'end',s cope:'menu Scope',lim it:2}})
}
}
}
Here's the HTML i'm using:
<div id="localNavContainer">
<ul id="localNav">
<li id="simplicity"><a href="choose-simplicity.ph p" onmouseover="Effect.divSwa p('simplic ity-hero', 'centerCol ');" title="Simplicity"></a></l i>
<li id="style"><a class="selected" href="choose-style.php" onmouseover="Effect.divSwa p('style-h ero','cent erCol');" title="Style"></a></li>
<li id="performance"><a href="choose-performance.p hp" onmouseover="Effect.divSwa p('perform ance-hero' ,'centerCo l');" title="Performance"></a></ li>
</ul>
<div><img src="img/bg/largedivider.j pg" 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?
Effect.divSwap = function(element,container
var div = document.getElementById(co
var nodeList = div.childNodes;
var queue = Effect.Queues.get('menuSco
if(queue.toArray().length<
if(Element.visible(element
for(i=0;i<nodeList.length;
if(nodeList.item(i).nodeNa
if(Element.visible(nodeLis
Effect.Fade(nodeList.item(
}
}
}
Effect.Appear(element,{que
}
}
}
Here's the HTML i'm using:
<div id="localNavContainer">
<ul id="localNav">
<li id="simplicity"><a href="choose-simplicity.ph
<li id="style"><a class="selected" href="choose-style.php" onmouseover="Effect.divSwa
<li id="performance"><a href="choose-performance.p
</ul>
<div><img src="img/bg/largedivider.j
</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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.