-
AuthorPosts
-
February 12, 2015 at 2:03 pm #205209
drulesParticipantHi there,
I need some help with adding an anchor page link on the submenu of the main menu. I don’t want to redirect the user to another menu. It works fine there. How do I stay on the main menu and create an anchor page link on the submenu.I have created the links in Visual Composer and they work fine when I am redirected to a completely different menu for that page because I have selected the menu under One Page Navigation.
http://www.innovationculturegroup.com/clients/services-vc/However this is where I want it to appear on the main menu. When I click on the submenu item of Innovation Focused Cultures the link goes nowhere. It should jump to the anchor text on the Services-VC page.
http://www.innovationculturegroup.com/This is really good template, I’m just stuck.
February 13, 2015 at 6:13 am #205817
SenthilMemberHi There,
Thanks for writing in!
We can see that the sub-menu navigation is working fine and pointing the services page and jumping to the right section too.
We hope you made it work already.If not, kindly let us know with the browser name & version you’re viewing.
So we can take a closer look and help you to get it fixed.Thanks!
February 13, 2015 at 4:09 pm #206162
drulesParticipantYes, I found the answer from a forum response that told me to copy and paste this javascript code below into the custom area. Suddenly the links started working. On the Services page, I then linked the one page navigation to the main menu. Thank you guys for all your help on my recent posts.
https://theme.co/x/member/forums/topic/page-links-using-ids/page/2/#post-98964
// Conditions
// 1. Menu should be using full url, eg. http://site.com/#x-content-band-1 and not just #x-content-band-1
// 2. Use just one menu for both Primary and One Page.jQuery(function($){
var window_base = window.location.href.split(“#”).slice(0)[0];
var window_hash = window.location.hash == ” ? ‘body’ : ‘#’+window.location.href.split(“#”).slice(-1)[0];
var outbound = /^https?:\/\//i;$(‘.x-nav a’).each(function(){ //Scan links and convert them to relative hash for one page navigation’s Active statuses to work properly when manually scrolling
var hash = /#/.test( $(this).attr(‘href’) ) ? ‘#’ + $(this).attr(‘href’).split(“#”).slice(-1)[0] : ”;
var anchor_base = /#/.test( $(this).attr(‘href’) ) ? $(this).attr(‘href’).split(“#”).slice(0)[0] : $(this).attr(‘href’);if(hash) { //Does it have hash? then perform check
if(anchor_base == window_base) { //If same page, then no need to reload, just make it relative
$(this).attr(‘href’, hash);
} // Else, leave it that way. So when user clicked, it will just link them to outbound page
}}).click(function(e){ //Enable Parent and Submenu scrolling
var hash = /#/.test( $(this).
February 14, 2015 at 4:46 pm #206748
RadModeratorOkay cool, nice find 😉 cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-205209 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
