I have a bit of a strange issue with a CSS styled unordered list
(contained within a <div>).
The layer is acting as a drop down when triggered by a JS onmouse
event of a link - this works fine.
However the layer has a unordered list containing links - when you
hover over the link, the layer flickers quickly. If you move your
mouse away from the UL area, it is fine, which indicated to me that it
is a <a>/<ulissue.
My code is below... does anyone have any idea why this is so?
TIA
JS Layer Trigger Code
=============== =====
<script language="javas cript" type="text/javascript">
function depMenuTog()
{
if(document.get ElementById("de pmenulayer").st yle.display=="n one")
{
document.getEle mentById("depme nulayer").style .display="block ";
}
else
{
document.getEle mentById("depme nulayer").style .display="none" ;
}
}
</script>
CSS For The Layer and List
=============== =====
#depmenulayer ul
{
margin: 5px;
padding: 0;
}
#depmenulayer ul li
{
display: inline;
}
#depmenulayer li a
{
float: left;
text-decoration:none ;
width: 13em;
}
Layer Code
=============== =====
<div id="depmenulaye r" onmouseout="jav ascript:depMenu Tog()"
style="display: none">
<ul>
<?php
for ($i=1;$i<=sizeo f($dep_menu_lis t);$i++)
{
echo "<li\"><a href=\"#\">".$d ep_menu_list[$i]['name']."</a></li>\n";
}
?>
</ul>
</div>
(contained within a <div>).
The layer is acting as a drop down when triggered by a JS onmouse
event of a link - this works fine.
However the layer has a unordered list containing links - when you
hover over the link, the layer flickers quickly. If you move your
mouse away from the UL area, it is fine, which indicated to me that it
is a <a>/<ulissue.
My code is below... does anyone have any idea why this is so?
TIA
JS Layer Trigger Code
=============== =====
<script language="javas cript" type="text/javascript">
function depMenuTog()
{
if(document.get ElementById("de pmenulayer").st yle.display=="n one")
{
document.getEle mentById("depme nulayer").style .display="block ";
}
else
{
document.getEle mentById("depme nulayer").style .display="none" ;
}
}
</script>
CSS For The Layer and List
=============== =====
#depmenulayer ul
{
margin: 5px;
padding: 0;
}
#depmenulayer ul li
{
display: inline;
}
#depmenulayer li a
{
float: left;
text-decoration:none ;
width: 13em;
}
Layer Code
=============== =====
<div id="depmenulaye r" onmouseout="jav ascript:depMenu Tog()"
style="display: none">
<ul>
<?php
for ($i=1;$i<=sizeo f($dep_menu_lis t);$i++)
{
echo "<li\"><a href=\"#\">".$d ep_menu_list[$i]['name']."</a></li>\n";
}
?>
</ul>
</div>
Comment