0

I'm using the one page site module to make a one page design website. When scroll down, I want the menu to mode up to the top of the screen and get sticky there. I found some solutions for that, e.g. here.

The problem is that when I include jquery library link to my page.tpl.php to make the sticky menu script work, the one page site module doesn't work anymore. This module depends on the jquery update module. How can I combine the one page site module with a jquery sticky menu?

Thanks! Steven

6
  • 1
    you don't need another copy of jquery library in page.tpl.php if you're using jquery_update
    – Beebee
    Oct 6, 2015 at 13:24
  • But with jquery_update alone the sticky menu script I mentioned above doesn't work at all
    – Steven
    Oct 6, 2015 at 13:25
  • 1
    The script is likely incompatible with the version of jQuery then @Steven. There's nothing Drupal can do to help you with that, you'll need to rewrite the menu script, or lower your version of jQuery
    – Clive
    Oct 6, 2015 at 13:38
  • That sticky header jquery looks absolutely generic and should work with any jQuery provided by jquery_update module.
    – Beebee
    Oct 6, 2015 at 16:01
  • 1
    I contacted the maintainer of the Single Page Site module. When scrolling down, a .fixed CSS class is added to the markup when the menu disappears. So it's very easy to add the CSS to obtain the sticky menu.
    – Steven
    Oct 8, 2015 at 16:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.