jQuery 导航 - 保持手风琴打开并显示活动页面

发布于 2024-08-09 18:40:18 字数 373 浏览 1 评论 0原文

我见过类似的相关 发布,但我的情况有点不同,所以我发布了一个新问题。

我正在开发一个由其他人构建的网站。导航是一种手风琴样式,效果很好,但我需要能够使导航保持打开状态,并突出显示当前活动页面。我对 jQuery 比较陌生,你能帮忙吗:

  1. 如何保持导航打开,并
  2. 突出显示活动链接 - 我知道如何在 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:

  1. How do I keep the navigation open, and
  2. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

迷爱 2024-08-16 18:40:18

我认为这篇文章可能会帮助您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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文