i want to use two javascript sliding menu on same page but in both of them second one not working.i have tried to change the code in <head> many time in different ways but problem not getting fix.
Looking for your kind help.
Thanks
<head>
<script type="text/javascript" src="res/sdmenu.js"></script>
<script type="text/javascript">
// <![CDATA[
var myMenu;
window.onload = function() {
myMenu = new cont("1st-sdmenu, 2nd-sdmenu");
myMenu.init();
};
// ]]>
</script>
</head>
<div id="1st-sdmenu" class="cont">
<div class="collapsed">
<span>Bicycles</span>
<a href="#">Product Series</a>
<a href="#">Product Series</a>
</div>
<div class="collapsed">
<span>Electronic</span>
<a href="#">Product Series</a>
<a href="#">Product Series</a>
</div>
</div>
<div id="2nd-sdmenu" class="cont">
<div class="collapsed">
<span>Bicycles</span>
<a href="#">Product Series</a>
<a href="#">Product Series</a>
</div>
<div class="collapsed">
<span>Electronic</span>
<a href="#">Product Series</a>
<a href="#">Product Series</a>
</div>
</div>
Try this. It will initialize one at a time.