- This topic has 7 replies, 2 voices, and was last updated 6 years, 10 months ago by Tom.
September 17, 2015 at 5:20 am #137460Frederik
i use gp-hooks to display header images before head.
Now the menu-plus transition starts too early and results in displaying navigation twice when scrolling the page.
I suppose that menu-plus uses exactly the height of menu+logo(x-px) before it starts to fade ?
is it possible to adjust this and add the 450px of image-slider to this value ?
thx for your aluable support
FSeptember 17, 2015 at 10:26 am #137521TomLead DeveloperLead Developer
Interesting, it’s supposed to wait until it’s 75px passed the navigation to appear.
I wrote the JS to calculate the height between the top of the website and the navigation, and then add 75px to it.
I believe in this case it’s calculating the height, and then the slider is initiating, adding height to the page after my code has done it’s thing.
Let me do some tests on this – I should be able to come up with a fix 🙂September 20, 2015 at 9:07 am #138230Frederik
good to hear that there might be a fix for it.
until it is fixed, will there be a workaround to manually add the 450px of header-height into the js ?September 21, 2015 at 11:36 am #138566TomLead DeveloperLead Developer
I just took another look at your site to reproduce the issue because I couldn’t on my dev server.
It looks like it’s working now – did you change anything?
Let me know 🙂September 21, 2015 at 1:03 pm #138591Frederik
YES, i could solve it by adding a div around it:
before -non working hook:
<?php if (is_front_page() and is_home() ) : ?> <?php echo do_shortcode("[metaslider id=305 percentwidth=100]"); ?> <?php endif; ?>
after – now working hook:
<div id="slider"> <?php if (is_front_page() and is_home() ) : ?> <?php echo do_shortcode("[metaslider id=305 percentwidth=100]"); ?> <?php endif; ?> </div>
seems to work now……so far…..
however, if you still want to play around with it i can provide the non-working hook for next 24hrs….:)September 22, 2015 at 1:26 pm #138850TomLead DeveloperLead Developer
Interesting – thanks for sharing the solution!
I would put the opening div and closing div within the if conditional, or else you’ll have an empty HTML element on pages where that conditional isn’t true.September 22, 2015 at 11:47 pm #138960Frederik
very good point! Thank you for this input!September 23, 2015 at 12:17 am #138962
- You must be logged in to reply to this topic.