Does anyone know how to adjust the code so "more than one" menu can be put on a webpage?
Another menu I have https://github.com/jellekra... one can just duplicate the JS code and rename the ID.
$('#MyFamily').responsiveTabs({
rotate: false,
startCollapsed: 'false',
collapsible: 'accordion',
setHash: true,
disabled: [],
activate: function(e, tab) {
$('.info').html('Tab ' + tab.id + ' activated!');
},
activateState: function(e, state) {
//console.log(state);
$('.info').html('Switched from ' + state.oldState + ' state to ' + state.newState + ' state!');
}
});
But this menu doesn't work the same......
Can anyone help?
Ironically this was supposed to have been built to work on "one page" websites, which is what I have, but, lol..... does seem so easy?
http://www.leeuniverse.com "Other Mods" section.
**UPDATE....**
Okay, so got it "mostly" working, by renaming the "ID's" in the HTML code.
But the problem I'm having now is when I go to the second menue, you actually have to "click" a Tab for the content window to show. And if you go back to the first instance of the menu, you again have to actually click a tab for the content window to show. Only on the first display of the first menu is the Home tab active and the content displays.
disqus_UZrzuW8WD3 () - 9 years ago - Reply 0
BTW, for those having "box fitting" problems..... The "container" CSS should look something like this.
.vertical-tabs-container {
position: relative;
display: inline-block;
width: 99%;
margin: auto;
}
He should have included this in his example for idiots like me who don't know how to code.
I spent a whole day with another tab thing like this one, and then this one trying to figure out how to get the container to work right.
So, add the above or similar to your .CSS for this.
Thank you for the code BTW, and also to the original author...... This was exactly what I've been looking for.
24 hours of Google and nothing was responsive worked right, or looked good, and there was almost no vertical ones.
disqus_UZrzuW8WD3 () - 9 years ago - Reply 0
The snippets is great but the active class is removed as soon as the page is refreshed which is a bit a nuisance to me.. i tried to make it stick but no luck so far
Rabi Shrestha () - 10 years ago - Reply 0
Make use of the # in the url and get the url with javascript. Then you can simply open the right page by taking the #tag.
If you need assistance, mail me -> alex (AT) youngandcreative (DOT) de
Alex () - 10 years ago - Reply 0