The key is simply to call the initialization code multiple times:
Code:
ddsmoothmenu.init({
mainmenuid: "smoothmenu-ajax",
customtheme: ["#1c5a80", "#18374a"], //override default menu CSS background values? Uncomment: ["normal_background", "hover_background"]
contentsource: ["smoothcontainer", "smoothmenu.htm"] //"markup" or ["container_id", "path_to_menu_file"]
})
Where the code in red is unique for each instance of the menu. Make sure the corresponding empty DIV is defined on the page as well.
You shouldn't be embeding multiple copies of the code in the HEAD section of your page, ie this portion:
Code:
<link rel="stylesheet" type="text/css" href="ddsmoothmenu.css">
<!--[if lte IE 7]>
<style type="text/css">
html .ddsmoothmenu{height: 1%;} /*Holly Hack for IE7 and below*/
</style>
<![endif]-->
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript" src="ddsmoothmenu.js">
/***********************************************
* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
Remove the duplicate copy. FYI if you view the script page, there are two Smooth Menus running on the page already. View source to get a better idea of how the two instances are called.
Bookmarks