I have used php includes before, but for some reason it is not working with this menu. I'm sure I am doing something wrong, but I cannot figure it out.
I also tried the first option from molendijk (thanks for providing the code), but that did not work for me, either, though I am unsure why, because I copied it directly.
The old smooth menu script with the external file had this in the head section:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<link rel="stylesheet" type="text/css" href="ddsmoothmenu.css" />
<link rel="stylesheet" type="text/css" href="ddsmoothmenu-v.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/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>
<script type="text/javascript">
ddsmoothmenu.init({
mainmenuid: "smoothmenu1", //menu DIV id
orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'ddsmoothmenu', //class added to menu's outer DIV
customtheme: ["#730007", "#990000"],
contentsource: ["smoothcontainer", "smoothmenu.html"] //"markup" or ["container_id", "path_to_menu_file"]
})
</script>
<script type="text/javascript">
ddsmoothmenu.init({
mainmenuid: "smoothmenu1", //menu DIV id
orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'ddsmoothmenu', //class added to menu's outer DIV
customtheme: ["#730007", "#990000"],
contentsource: ["smoothcontainermobile", "smoothmenu.html"] //"markup" or ["container_id", "path_to_menu_file"]
})
</script>
I tried to create this in the head section for the new menu, but obviously I'm not very good with coding, so I guess I am goofing something up, because it is not working:
Code:
]
<!-- Required Libraries -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js"></script>
<!-- Load Menu Specific Files -->
<script src="compactmenu.js"></script>
<link rel="stylesheet" type="text/css" href="compactmenu.css" />
<script type="text/javascript">
ddsmoothmenu.init({
mainmenuid: "menu3", //menu DIV id
classname: 'container', //class added to menu's outer DIV
customtheme: 'theme-theme3',
transition: 'set3'
contentsource: ["sitemapmobileinclude", "sitemapmobile.html"] //"markup" or ["container_id", "path_to_menu_file"]
})
</script>
Obviously, I am doing something wrong. :-) Any ideas?
Bookmarks