Neil1
10-17-2014, 12:30 PM
1) Script Title: Side Push Menu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/pushmenu.htm
3) Describe problem:
I am currently using this script for my navigation. I have removed the fa-fa-bars thingy at the side and am using an image to toggle the menu.
<nav id="pushmenu1" class="pushmenu">
[CONTENT OF NAVIGATION PANEL HERE]
</nav>
<a href="#"><img src="img/navnew.png" onClick="menu1.toggle(); return false" class="toggleitem" id="navlink"</img></a>
However each page is going to be a tour of various parts of town, incorporating a list of things to see/visit, to keep the page reasonably sized I was hoping to have a list of venues with each one also toggling a separate side push menu on which I could add map / photo / address / etc.
<ul>
<li><a href="#" onClick="menu2.toggle(); return false" class="toggleitem"><strong>Venue 1</strong></a></li>
<li><a href="#" onClick="menu3.toggle(); return false" class="toggleitem"><strong>Venue 2</strong></a></li>
<li><a href="#" onClick="menu4.toggle(); return false" class="toggleitem"><strong>Venue 3</strong></a></li>
<li><a href="#" onClick="menu5.toggle(); return false" class="toggleitem"><strong>Venue 4</strong></a></li>
<li><a href="#" onClick="menu6.toggle(); return false" class="toggleitem"><strong>Venue 5</strong></a></li>
</ul>
For each one I have added a new <nav id> EG:
<nav id="pushmenu2" class="pushmenu">
[CONTENT OF NAVIGATION PANEL HERE]
</nav>
And added to the javascript:
jQuery(function(){ // on DOM load
menu1 = new pushmenu({ // initialize menu example
menuid: 'pushmenu1',
position: 'left',
marginoffset: 0,
revealamt: -8,
onopenclose:function(state){
//console.log(state) //"open" or "closed"
}
})
})
jQuery(function(){ // on DOM load
menu2 = new pushmenu({ // initialize menu example
menuid: 'pushmenu2',
position: 'left',
marginoffset: 0,
revealamt: -8,
onopenclose:function(state){
//console.log(state) //"open" or "closed"
}
})
})
But all that happens is the original navigation toggle link (The one open the navigation panel) works the same, however of the subsequent venue ones the top one jumps me top of the page and the others do nothing at all.
I realise in the posting guidelines it says you don't cover trying to use a script multiple times so if it is a complex issue please just let me know and I'll come up with another way of acheiving it, if however anybody spots something simple I am just being silly and missing that'd be great :)
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/pushmenu.htm
3) Describe problem:
I am currently using this script for my navigation. I have removed the fa-fa-bars thingy at the side and am using an image to toggle the menu.
<nav id="pushmenu1" class="pushmenu">
[CONTENT OF NAVIGATION PANEL HERE]
</nav>
<a href="#"><img src="img/navnew.png" onClick="menu1.toggle(); return false" class="toggleitem" id="navlink"</img></a>
However each page is going to be a tour of various parts of town, incorporating a list of things to see/visit, to keep the page reasonably sized I was hoping to have a list of venues with each one also toggling a separate side push menu on which I could add map / photo / address / etc.
<ul>
<li><a href="#" onClick="menu2.toggle(); return false" class="toggleitem"><strong>Venue 1</strong></a></li>
<li><a href="#" onClick="menu3.toggle(); return false" class="toggleitem"><strong>Venue 2</strong></a></li>
<li><a href="#" onClick="menu4.toggle(); return false" class="toggleitem"><strong>Venue 3</strong></a></li>
<li><a href="#" onClick="menu5.toggle(); return false" class="toggleitem"><strong>Venue 4</strong></a></li>
<li><a href="#" onClick="menu6.toggle(); return false" class="toggleitem"><strong>Venue 5</strong></a></li>
</ul>
For each one I have added a new <nav id> EG:
<nav id="pushmenu2" class="pushmenu">
[CONTENT OF NAVIGATION PANEL HERE]
</nav>
And added to the javascript:
jQuery(function(){ // on DOM load
menu1 = new pushmenu({ // initialize menu example
menuid: 'pushmenu1',
position: 'left',
marginoffset: 0,
revealamt: -8,
onopenclose:function(state){
//console.log(state) //"open" or "closed"
}
})
})
jQuery(function(){ // on DOM load
menu2 = new pushmenu({ // initialize menu example
menuid: 'pushmenu2',
position: 'left',
marginoffset: 0,
revealamt: -8,
onopenclose:function(state){
//console.log(state) //"open" or "closed"
}
})
})
But all that happens is the original navigation toggle link (The one open the navigation panel) works the same, however of the subsequent venue ones the top one jumps me top of the page and the others do nothing at all.
I realise in the posting guidelines it says you don't cover trying to use a script multiple times so if it is a complex issue please just let me know and I'll come up with another way of acheiving it, if however anybody spots something simple I am just being silly and missing that'd be great :)