阅读背景:

当我通过Javascript更改ID的CSS类时,我的jQuery导航栏不反映更改..?

来源:互联网 

I've got a single, main nav bar in it's own file, nav_bar.shtml, which every other page includes. This menu bar is a jQuery menu bar (ApyCom is the name of the company that sells these nav bars). How an item on the nav bar determines if it's active or not (and thus highlighting it so the user knows) is through the class="current" on the list item. Here's what I CAN do- I can, with JavaScript, alter my list item's class attribute. I have a switch statement in JavaScript that determines which list item's class to make "current" by using the window.location.href, in the window.onload function. All of this works fine. When I navigate to another page, the correct list item's class is made "current".I've got a single, main nav bar in it's own fil




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: