Skip to main content
kineticcreative123
Inspiring
January 8, 2017
Answered

One Page bootstrap section ID's

  • January 8, 2017
  • 2 replies
  • 946 views

Hello,

My navigation works and scrolls to the right section but the down states are incorrect in the menu. Since this is one page I can't manually add an "active" class to another html page. How can you specify the active state in the menu when on a specific section of the page? This is a simple site. Frustrated why I can figure this out.

Any ideas?

here is the link.

http://wswdesign.com/new/

This topic has been closed for replies.
Correct answer BenPleysier

Hi Ben,

Great catch but that still didn't fix it. I removed all the id="". Weird. Would it happen to be a <section> that might not be closed? The problem started when I duplicated a section and tried to make the menu link go to that duplicated section.


Try setting the offset for scrollspy to 100 in

$('body').scrollspy({

  target: '.navbar-fixed-top',

  offset: 100

});

2 replies

BenPleysier
Community Expert
Community Expert
January 8, 2017

I don't quite understand the question because the site that you have referenced works exactly as you want it to.

Assuming that this is not your site, but is an illustration of what you want to achieve, please have a look at http://getbootstrap.com/javascript/#scrollspy

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
kineticcreative123
Inspiring
January 8, 2017

Hi Ben,

Yes the NAV works but when you click the menu link for 'print' , 'digital' is in the down state. When I click the 'branding' link 'print' is in it's down state.

Yes there is nothing wrong with the site. I contacted McAfee to rescan and correct the issue but of course not fixed yet.

Nancy OShea
Community Expert
Community Expert
January 8, 2017

Ummmm......  you've got bigger problems. Sorry to say I'm not willing to risk it.  You better find out what's throwing up red flags on your site and correct the problem ASAP.

Nancy O'Shea— Product User & Community Expert
BenPleysier
Community Expert
Community Expert
January 8, 2017

An overly zealous McAfee. There is nothing dubious in the site.

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!