Hi All,
We developed a menu bar and we used jquery for mouse hover to display sub menu items. menu items are read using JS from XML. we are experiencing a problem with hover in all other browsers except IE when we hit F5.
I found that the document.ready is being fired with out loading the complete document.
I found that the document.ready is being fired with out loading the complete document.
$(document).ready(function(){alert(" Doc Loaded"); //It printsalert($(".mainLinks").length);// Most of the times it prints 0, some times it prints the exact count.$(".mainLinks").each(function(){$(this).hover(function() {...}}});
script files included in this order.
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navBar.js"></script> // generates menu
<script type="text/javascript" src="now.js"></script> //hover functionality
I call showNavBar("","") in the middle of jsp which generates menu. document.ready is being called first in other browsers.
Thanks | Kranthi