Is it $("<selector>"), ("<selector>") or simply <selector>?

Comments

klonos’s picture

...I've tried all of the above, but none seems to work:

  • $("#nav")
  • ("#nav")
  • #nav
skein’s picture

The third one should have worked

klonos’s picture

Sorry, it doesn't. Just gave it a quick spin in simplytest.me too: http://simplytest.me/project/drupal/7.x?add[]=stickynav

After launching the sandbox:

- Enable the stickynav module.
- Switch to the Bartik theme (it has a footer region) as an admin theme.
- Go to the stickynav module config page.
- Check the Bartik theme checkbox.
- Enter #footer-wrapper as the selector (that's the id of the footer section in Bartik).
- Save.
- If your screen is too large, go to a long page such as the permissions or the modules page.

The footer is not sticky (stickynav.js is loaded though).

skein’s picture

Yes, that is because this module activates only when an element is scrolled of the screen to the top.
For example if use #header in a very long page then when you scroll down the header will pop off and stick.

Since the module is in dev branch only you can submit a feature request to make elements sticky all the time.

skein’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)