0

Does anyone know how to DISABLE the top nav menus from the automatic "active" state, based on vertical scrolling? This is common on all one-page templates. I think I've narrowed it down to either jquery.scrollTo.js or bootstrap.min.js, as possible files that do this.

My project is to convert a standard one-page template, where all [sections] can be viewed by scrolling, to look like a multi-page site by using javascript to set the CSS display to hidden on all [sections], unless the specific menu is selected. Problem is, when you choose a menu, and do any scrolling, the last menu gets highlighted instantly. I need the selected "active" menu to stay highlighted at all times.

  • 1
    If you're using a scrollspy, stop using a scrollspy, otherwise can you give an example? – Seiyria Jun 16 '14 at 18:36
  • I'm not using scrollspy. I'm using the "Merlin" Bootstrap 3 one-page template. Here's my site as example: http://reagentmap.com – DuckSportsFan Jun 16 '14 at 18:50
  • Other resources: [https://github.com/halibegic/Merlin](https://github.com/halibegic/Merlin) or [http://www.bootstrapstage.com/merlin/](http://www.bootstrapstage.com/merlin/) – DuckSportsFan Jun 16 '14 at 19:38
  • Based on their example, there's a function called `onePageNav` that takes an active class. You can either not call this function, change the class to be something else, or change the CSS rule for `.navbar-default .navbar-nav > .active > a`. – Seiyria Jun 16 '14 at 19:41
  • @Seiyria, Thanks! I'll report on your suggestion as soon as possible. If anyone else has a suggestion, in the mean time, please fire away. – DuckSportsFan Jun 16 '14 at 19:42
  • 1
    @Seiyria, I changed the "active" element in "script.js(initNavbar)" to "xactive" to suppress that function. That fixed the menu from switching the highlight to the last when scrolling... But I lost the auto-highlighting of any menu selected, then on. So I added a script to set the menu selected to "active", and now it works... Here's the stackoverflow link to that solution, thanks to Karl-André Gagnon [http://stackoverflow.com/questions/17975922](http://stackoverflow.com/questions/17975922) – DuckSportsFan Jun 16 '14 at 22:27
  • Glad to hear you managed to resolve it, @DuckSportsFan. – Seiyria Jun 17 '14 at 00:27

0 Answers0