jquery hover not working properly other than IE6
Hi All,
I developed a menu bar and using jquery for mouse hover functionality. I found that the document.ready is being fired with out loading the complete document.
- $(document).ready(function(){
- alert(" Doc Loaded"); //It prints
- alert($(".mainLinks").length); // Most of the times it prints 0, some times it prints the exact count.
mainLinks is the class name of <a> which is dynamically generated from XML. This works perfectly in only IE and not in other browsers esp when we hit F5 key.
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.
If I include generated menu content in jsp, it works fine coz it is getting the count every time.
Please let know how should I make sure that the document is completely loaded./ In other way why is it not loaded completely.
Thanks | Kranthi