简体   繁体   English

引导按钮显示活动状态无法正常工作

[英]Bootstrap buttons to show active state is not working correctly

Here is a demosite that I'm working on: http://tanzendesign.com/brightnews 这是我正在研究的一个演示站点: http ://tanzendesign.com/brightnews

I'm trying to use bootstrap active state button on top fixed menu, but when I click nav button, other button becomes active... 我试图在顶部固定菜单上使用引导活动状态按钮,但是当我单击导航按钮时,其他按钮变为活动状态...

How to solve this problem? 如何解决这个问题呢?

It looks like you're using Bootstrap's scrollspy to control that highlighting. 看起来您正在使用Bootstrap的scrollspy控制突出显示。 Make sure scrollspy is being refreshed after all the content has been loaded, and when the browser is resized, so the content area positions can be properly calculated. 确保在加载所有内容之后以及调整浏览器大小时刷新scrollspy,以便可以正确计算内容区域的位置。

$('[data-spy="scroll"]').each(function () {
  var $spy = $(this).scrollspy('refresh')
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM