سؤال

I can get the scrollspy to work on the first layer of nav, but I also have subnavs in each link, just like the one on bootstrap's page: http://getbootstrap.com/javascript/#affix, but I've tried for a while and just couldn't get the subnav to work...

Does anyone know the minimum structure to get the scrollspy to work on a two layer nav menu?

هل كانت مفيدة؟

المحلول

It should work the same way. Make sure that your hrefs have the correct id's

Here's an example... http://www.bootply.com/533U4Zo7Uq

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top