Jump to content

- - - - -

Scroll Spy - How to fix the li:active

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1 diretornak†


    Advanced Member

  • DMS Subscriber†
  • 88 posts

Posted 24 July 2012 - 04:34 PM

Hey guys. I have the scroll spy section working in a website, but for some reason the active state is bugged. The link#5 option keeps showing as active even if I select something else, and also whenever I load the page. Is there a way to fix this?

#2 beardedavenger


    Unicorn Wrangler

  • Members

  • 1219 posts

Posted 24 July 2012 - 05:09 PM

Heya, You have your id's and scroll headers in with empty p tags, on multiple hero units, so it really just wasn't designed to be used in this manner. The active states do work perfectly when all on one page, in a content area. That's sort of how it was designed to work anyways. Nick

#3 diretornak†


    Advanced Member

  • DMS Subscriber†
  • 88 posts

Posted 24 July 2012 - 06:00 PM

Yeah, this is weird tho. I tried using the scroll spy title on highlight sections instead of hero units, and it behaves differently. If I close the p tag the active state disappears and never shows up no matter what I click, and if I leave the p tag open, although the active state shows up, it stays static on a random link.

#4 Danny


    Is Awesome!

  • Moderators
  • 19793 posts

Posted 25 July 2012 - 09:06 AM

Hi, Like Nick stated above, the Scroll Spy wasn't mean't to be used in the way you're using it unfortunately. :(

#5 scottknight



  • Members
  • 1 posts

Posted 04 September 2012 - 07:41 AM

Hey Nelson, I am using scrollspy incorrectly just as you are ;-) I noticed on your site you were able to get around the link showing as active. How did you end up resolving this?

#6 catrina



  • Members
  • 12345 posts

Posted 04 September 2012 - 02:38 PM

I believe Nelson used CSS to accomplish this. For further insight:

Please Login or Register to see this Hidden Content

#7 toddatkins†


    Advanced Member

  • DMS Subscriber†
  • 73 posts

Posted 21 April 2013 - 06:37 PM

Nelson must have been removed from the forum because I don't see his posts in this thread.  I would also like to know how to get around this last scrollspy item staying active.  I realize it's not meant to be used with sections, but hey, what can I say?

#8 diretornak†


    Advanced Member

  • DMS Subscriber†
  • 88 posts

Posted 21 April 2013 - 07:06 PM

Sorry for the delay =[ I actually didnt get around it. For some reason scroll spy's behavior seems very random, so in that site's homepage it worked fine, but on the other pages it shows different active links. For an instance, in the page "Servi├žos" it natively shows the last link "premios" as active, but if you scroll down enough for the menu to stick on top, you will notice the active link gets stuck on "imobiliarios". I still dont understand why this happens.