Change:
Code:
var menuids=["sidebarmenu1", "sidebarmenu2", "sidebarmenu3"] //Enter id(s) of each Side Bar Menu's main UL, separated by commas
to:
Code:
var menuids=["sidebarmenu1"] //Enter id(s) of each Side Bar Menu's main UL, separated by commas
That will fix that one menu.
The browser cache may need to be cleared and/or the page refreshed to see changes.
If you have different menus with more or less menuids on different pages all using the same external script, instead of declaring this variable in the external script, declare it on each page before the external tag to the Side Menu Bar script. that would mean, removing:
Code:
var menuids=["sidebarmenu1", "sidebarmenu2", "sidebarmenu3"] //Enter id(s) of each Side Bar Menu's main UL, separated by commas
from the script and, for example on the page you linked to (census.php) add the highlighted:
Code:
<script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="//code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script type="text/javascript" src="files_java/jquery.dataTables.1.09.4.min.js"></script>
<script type="text/javascript" src="files_java/jquery.dataTables.tableTools.2.2.1-dev.js"></script>
<script type="text/javascript" src="files_java_mine/site_functions.js"></script>
<script type="text/javascript" src="files_java/jquery.functions.js"></script>
<script type="text/javascript">
var menuids=["sidebarmenu1"] //Enter id(s) of each Side Bar Menu's main UL, separated by commas
</script>
<script type="text/javascript" src="files_java/sideBarMenu.js"></script>
<script type="text/javascript" src="files_java/equalcolumns.js"></script>
<script type="text/javascript" src="files_java/tableRowHilite.js"></script>
OR you could use this modified version of the script:
Code:
// Nested Side Bar Menu (Mar 20th, 09)
// By Dynamic Drive: http://www.dynamicdrive.com/style/
var menuids=["sidebarmenu1", "sidebarmenu2", "sidebarmenu3"] //Enter id(s) of each Side Bar Menu's main UL, separated by commas
function initsidebarmenu()
{
for (var i=0; i<menuids.length; i++)
{
if(document.getElementById(menuids[i]))
{
var ultags = document.getElementById(menuids[i]).getElementsByTagName("ul")
for (var t=0; t<ultags.length; t++)
{
ultags[t].parentNode.getElementsByTagName("a")[0].className+=" subfolderstyle"
if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu
//dynamically position first level submenus to be width of main menu item
ultags[t].style.left=ultags[t].parentNode.offsetWidth+"px"
else //else if this is a sub level submenu (ul)
//position menu to the right of menu item that activated it
ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px"
ultags[t].parentNode.onmouseover=function()
{
this.getElementsByTagName("ul")[0].style.display="block"
}
ultags[t].parentNode.onmouseout=function()
{
this.getElementsByTagName("ul")[0].style.display="none"
}
}
//loop through all sub menus again, and use "display:none" to hide menus (to prevent possible page scrollbars
for (var t=ultags.length-1; t>-1; t--)
{
ultags[t].style.visibility="visible"
ultags[t].style.display="none"
}
}
}
}
if (window.addEventListener)
window.addEventListener("load", initsidebarmenu, false)
else if (window.attachEvent)
window.attachEvent("onload", initsidebarmenu)
Bookmarks