-
AuthorPosts
-
October 8, 2015 at 4:22 pm #515937
Hi,
First of all, great theme (Enfold) !
Second: I’m not a programmer so forgive me if I come across ignorant.I have several royalsliders on a onepage website which causes several challenges:
1: upon pageload to a certain slide-number from an external link the page is scrolling to the wrong vertical position
2: the active menu indicator indicates the wrong menu item.nr1:
I tried to workaround this issue by having the page scroll to an id after$(window).load(function()
with some added scripting in the child-theme function.php and custom.js. This is perhaps not the best way, but I couldn’t figure out another way.nr2:
I can’t seem to figure out how the menu indicator works. The strange thing is that the active menu indicator jumps to the correct position ONLY after I resize my browser window. As soon as I refresh the window or open a link in a new tab the menu indicator is wrong again.
I noticed that when I removed the sliders that the indicator worked perfectly again, so I can only conclude that the dynamic heights of the ‘stacked’ sliders are causing confusion to the indicator: it somehow calculates the vertical position on screen before the sliders are initiated (or somewhere along that line)?
So: Is there a way to have the menu indicator check if it’s in the right location AFTER the sliders have been initiated somehow..? I don’t want to remove them, as it’s quite a long page and it’s a great feature for visitors to see where they are!Thanks, any help is much appreciated!
October 9, 2015 at 8:26 am #516211Hey rcdillon,
I’m not sure what slider you are using there but I don’t think it was bundled with the theme, correct? You might want to check with the plugin authors first about this. We’d be happy to have a look though if you could send us a temporary admin login in the Private Content section of your reply. Please keep in mind though that third party plugins are not covered by our support.
Best regards,
RikardOctober 9, 2015 at 11:38 am #516316Hi Rikard, thanks for the reply.
The sliders I am using are ‘royalSlider’, from , I have chosen these as they support deeplinking and full html content sliders (among other things).
The sliders are indeed not bundled with the theme and not officially supported, I understand, so I really appreciate you think with me. I don’t want to get caught between the support of an awesome theme and an awesome plugin. So if I can i am trying to limit my question to how the menu-indicator is scripted and how I can do something on that side.
Much of the interaction of the website is based on these sliders and everything works great, if only I can figure out how to ‘stall’ or refresh the calculation of all the #anchor positions for the menu indicators (is there a script that is doing this?). As I mentioned, after browser resizing, the menu indicators magically work perfectly, so I believe there must be a solution to get them working from the start.Thanks a lot! Kind regards.
October 9, 2015 at 6:11 pm #516620I am facing the same issue using the enfold full width slider that comes with the enfold layout builder. The current-menu-item class in a one page navigation shows up randomly. The navigation works but the active menu class won’t show up correctly. I had an almost sleepless night searching for the reason. After reading this thread I removed the full width slider element and all links showed up with correct active menu items. However I need the full width slider and it is not a third party plugin but an element of the avia framework. Any help on this is appreciated. I have reported the issue in this thread
https://kriesi.at/support/topic/one-page-menu-sometimes-shows-current-menu-item-state-randomly/
and thanks @rcdillon for pointing me to the right direction! I was starting to pull my hair out …P.S.: Finally it turned out that it was the menu item “home” that was linked to the id #top. The menu shows up correctly after removing the id #top from the menu. Could it be that you have linked your home button to the id #top too?
- This reply was modified 9 years, 1 month ago by bluecafe.
October 11, 2015 at 5:56 pm #516995Thanks @bluecafe,
unfortunately, I don’t have anything linking to #top, other than the ‘scroll to top’ button from enfold.
Glad my post got you in the right direction though ;)Still hoping to hear from kriesi support if there are any other leads?
Thanks again!
October 13, 2015 at 4:28 am #517818Hi,
The indicators seem to work fine on my end, though I’m only seeing the shortcode for the sliders? Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
RikardOctober 13, 2015 at 9:12 am #517889Hi Rikard,
thank you for your reply. You are probably only looking at the second example. I have posted two example pages:
1: not working indicators (sliders are active).
2: (has working indicators (sliders deactivated, by changing the slidershortcodes into something that is not recognised, that’s why you’re seeing partial shortcodes in place of the sliders),And a temp login is below.
Looking forward to your thoughts, I’m completely stuck.
- This reply was modified 9 years, 1 month ago by rcdillon.
October 14, 2015 at 11:59 am #518594Hey!
you are using an old version of WordPress, please update.
Deactivate all plugins, to check which one is causing this issue.Cheers!
AndyOctober 14, 2015 at 12:41 pm #518609Hi Andy,
I updated WordPress.
Regarding the plugins, I already know that RoyalSlider (not officially supported by Enfold) is causing the wrong behaviour of the active menu indicator. Please see my previous posts explaining the issue.
I was hoping I could get some more insight in how the menu indicator works.For instance, on a related note:
if I get linked to a certain #anchor on the page from an outside link, normally the site would scroll down to the #div id of that anchor. But in my case I already noticed that if the sliders are not fully loaded yet (the sliders-heights are not fixed heights), that the browser would scroll down to an incorrect yPosition, namely the position of an ’empty’ color section (you can see that in the link I gave with the sliders deactivated, without sliders everything works). To bypass this issue, and still be able to use the sliders, I had to create a TimeOut before the browser scrolls, so that the yPositions of all the #anchor points would be calculated correctly.The menu indicators, however, are based on the ‘wrong’ initial load positions, not on the positions when the complete document (including sliders and images) are fully loaded.
Is there a way I could ‘stall’ the calculation of the div positions until everything is loaded? As mentioned, if I resize the browser, the menu indicators work fine again.
Thanks so much for thinking with me. Kind regards.
- This reply was modified 9 years, 1 month ago by rcdillon.
October 14, 2015 at 12:53 pm #518616Hey!
unfortunately it would require a huge amount of time and customization to achieve that. If plugin’s author can’t help you with this issue and you really need it, then it would be best to hire a freelance developer for this job.
Cheers!
AndyOctober 14, 2015 at 2:06 pm #518659Hi, I understand, thanks.
I opened a support ticket at the plugin’s developer too, hope they have an idea.
If not, I’ll either remove the menu indicator or hire a freelancer (depending on budget/time needed).Kind regards.
October 14, 2015 at 2:13 pm #518665Hi!
alright. Let us know in a new ticket if you have some more questions related to the theme. We are happy to assist you.
Regards,
Andy -
AuthorPosts
- The topic ‘dynamic anchor issue with active menu indicator and scroll on pageload’ is closed to new replies.