jQuery 导航 - 保持手风琴打开并显示活动页面
我见过类似的相关 发布,但我的情况有点不同,所以我发布了一个新问题。
我正在开发一个由其他人构建的网站。导航是一种手风琴样式,效果很好,但我需要能够使导航保持打开状态,并突出显示当前活动页面。我对 jQuery 比较陌生,你能帮忙吗:
- 如何保持导航打开,并
- 突出显示活动链接 - 我知道如何在 CSS 中执行此部分,但我不确定如何使用 jQuery 动态执行此操作。
预先感谢您的任何帮助。
I have seen a similar related post but my situation is a little different so I am posting a new question.
I am working on a site that was built by someone else. The navigation is an accordion style that works nicely but I need to be able to have the navigation remain open with the current active page highlighted. I am relatively new to jQuery and could you some help with:
- How do I keep the navigation open, and
- Highlight the active link - I know how to do this part in CSS, but I am not sure how to do that dynamically using jQuery.
Thanks in advance for any assistance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这篇文章可能会帮助您http://www.packtpub。 com/article/jquery-ui-accordion-widget-part2
向下滚动到“手风琴的乐趣”部分。他谈到了使用导航属性以及为您当前所在的页面打开和设置菜单。
I think this article might help you out http://www.packtpub.com/article/jquery-ui-accordion-widget-part2
Scroll down to the section "Fun with Accordion". He talks about using the navigation property and having the menu open and set for the page you are currently on.