开发者

JQuery: Don't want "Open Hover" state on accordion menu

开发者 https://www.devze.com 2023-02-23 00:28 出处:网络
Hi Everyone I have an accordion menu that I\'ve adapted from this one I found on DynamicDri开发者_Go百科ve.com.

Hi Everyone

I have an accordion menu that I've adapted from this one I found on DynamicDri开发者_Go百科ve.com. Instead of the typical UL type accordion, this one hides and reveals DIVs.

I need 3 states for the headings:

  • Closed (black text / white background)
  • Closed Hover (white text / black background)
  • Open (red text / white background)

At the moment there is a 4th state (Open Hover), but I don't want this.

How do I make the open state have no hover? (or have it's on unique hover state). At the moment the script applies the same closed-hover css style to the open-hover state.

Here is the code on JSFiddle. I know there is a lot of JavaScript there, but any help would be greatly appreciated.


do you mean like this: Updated fiddle

if that's what you're after the only changes are in the CSS.. I had to make the .openheader link rule more specific (by putting the a in front of it) to match the specificity of the a.menuitem links.. then made sure all the a.menuitem rules were preceding the a.openheader one

0

精彩评论

暂无评论...
验证码 换一张
取 消