Home > Backend Development > PHP Tutorial > javascript - 导航怎么保持页面跳转后定位到导航中那个item?

javascript - 导航怎么保持页面跳转后定位到导航中那个item?

WBOY
Release: 2016-06-06 20:15:21
Original
1132 people have browsed it

手风琴式的侧边栏,每个item是一个链接,怎么保证页面跳转后侧边栏该item是激活状态?

回复内容:

手风琴式的侧边栏,每个item是一个链接,怎么保证页面跳转后侧边栏该item是激活状态?

如果是动态页面,导航栏点击的链接加一个actived类,使用ajax只让内容刷新,导航栏不刷新。
如果是静态页面,在新的页面中为导航栏中对应的链接加上一个actived类。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template