1) Script Title: DD Tab Menu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm
3) Describe problem: When the page loads, there is a slight delay before the sub-menu's content is displayed. Is there a way to avoid that?
1) Script Title: DD Tab Menu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm
3) Describe problem: When the page loads, there is a slight delay before the sub-menu's content is displayed. Is there a way to avoid that?
That's because the menu is initialized after the document has loaded. You can avoid that delay by first moving the initialization code within your HTML from the HEAD to the very bottom of the page, ie:
Then, inside the js file, change:Code:<script type="text/javascript"> //SYNTAX: ddtabmenu.definemenu("tab_menu_id", integer OR "auto") ddtabmenu.definemenu("ddtabs1", 0) //initialize Tab Menu with ID "ddtabs1" and select 1st tab by default </script> </body>
to just:Code:this.addEvent(window, function(){ddtabmenu.init(tabid, dselected)}, "load")
Code:ddtabmenu.init(tabid, dselected)
hey that works great, thank you.
is there any risk involved in doing this?
Bookmarks