
Originally Posted by
bluewalrus
Ok so I got it to work kind of the mouse over on the links that come up under it arent always active. Also would this be the conditional statement for ie 6 cause i got this from that article and assumed that it did it. I don't have ie 6 i'm on a mac:
Code:
<script type="text/javascript"><!--//--><![CDATA[//><!--
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList;
//--><!]]></script>
Link:
http://www.travelinchucks.com/index.html
That isn't a "conditional statement", that's merely a script. If you are running that script on your site without a conditional statement wrapped around it, then you are putting a lot of unnecessary strain on IE 7.
This would be how it would look wrapped in a conditional statement:
Code:
<!--[if IE lte 6]>
<script type="text/javascript">
<!--//-->
<![CDATA[//>
<!--
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList;
//--><!]]>
</script>
<![endif]-->
Bookmarks