Jump to content
TourKick (Clifford P)

Scrollspy not working perfectly

Recommended Posts

catrina

Each piece of content you're targetting with Scrollspy needs to be a minimum height of 500 pixels or more (in other words, each area needs to be a large enough height in order for the correct highlighting of links).

The last targeted content area is a pain, because it applies the active state when the title that holds the scroll-header is at 50% the height of the screen. So if you have h2 class="scroll-header" it wont apply the active state class to the link, until that title is in the middle of the screen.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
TourKick (Clifford P)

Each of the 3 scrollspy sections is over 500px tall. I'm not following what the issue is or how to fix it. Maybe a screenshot with annotations would help me.

Share this post


Link to post
Share on other sites
Danny

There is no issue here, you're using Scroll Spy with Boxes. Scroll spy was designed to target content on a page/post and not for section use.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • Buishi
      By Buishi
      Hi there,
       
      I'm having the following problem: I set up a scroll spy on my homepage, and put several sections throughout the homepage with .scroll-headers (for example: <h4 class="scroll-header" title="Testimonials">Testimonials</h4>). The problem is, the menu highlighting doesn't change as I scroll, only the last menu item remains highlighted. Any idea what's going on? See here:
       
      http://designmancan.com/CLL/
    • Buishi
      By Buishi
      I could have sworn I read in the documentation somewhere about creating a scroll-spy link using HTML (something like <a href="somesection" rel="scroll-spy" class="btn">button</a>), but I can't find it where I expected to. Is this possible? Basically, I want to use scroll spy from the main menu, instead of a separate scrollspy section. Possible, or do I need a different plugin?
    • seatangltd
      By seatangltd
      Hi,
       
      I'm having an issue with the scrollspy section. When I click on one of the buttons, it brings me down to the relevant content, but in the middle of the header text (which contains the scrollspy tags) as shown: http://grab.by/wNri
       
      The page should scroll down to just above the header text something like this: http://grab.by/wNta
       
      I know that scrollspy isn't meant for use with sections, but I tested it with content inside a single text box and had the same issue.
       
      http://cavistons.com/food-emporium/cheese/
       
       
    • ketri
      By ketri
      Hello

      If I understand http://docs.pagelines.com/tutorials/using-scrollspy this correctly, then I'm supposed to implement the scrollspy-navigation section to a page, and then write the page content in the WordPress admin-panel, and to the content of the site create sections for the scroll spy like:
       
      <h4 class="scroll-header" title="Setup"></h4> <p>Your content here</p>  
      Or possibly use a text box -section where I can write scrollspy-compatible html myself.

      As I can set the css-classes needed for scrollspy to my DMS sections easily, is it possible to also add the title so I could just drag & drop a landing page that scrolls to different sections? so I could use the scrollspy to scroll to i.e. specific section in my page like Column that has content inside it, or scroll to a fullwidth slideshow etc?

      Thank you


       
    • janemackey
      By janemackey
      Hello,
      I am thinking about switching from a fixed nav bar at the top of my website to using scrollspy. I understand how to do the basic implementation from the documentation but I have a few questions.
       
      1) On a mobile device, it seems like the scrollspy navbar doesn't stay at the top with the small menu icon that I had when using the fixed navbar. How can I get this to work?
       
      2) How can I put my logo in the scrollspy navbar?
       
      ) How can it be full width the whole time instead of only when you start scrolling?
       
      This is all similar to wndrmnt.com that is used as an example of how one can use scrollspy navigation.
       
      And I assume scrollspy should be at the top of the content/template area and not in the header area.
       
      thanks for any help,
      jane
×