lbreau
lbreau

Reputation: 63

:not selector not working, removing classes aren't leaving...?

I left images out but the functionality is there. I'm trying to:

  1. once an li is clicked, apply some classes and append a word. (this works)
  2. disable the hover effect on the currently selected item. (not working)
  3. when a different li is clicked, restore to base then do step 1 and 2 with the newly selected li.

I've had pieces of this working at times. Via Firebug, the classes are all being added but I must not be selecting the correct way with multiple classes.

http://jsfiddle.net/thumbslinger/HbezN/3/

Upvotes: 0

Views: 64

Answers (2)

Jayantha Lal Sirisena
Jayantha Lal Sirisena

Reputation: 21366

http://jsfiddle.net/HbezN/13/ you need to remove the added span from li before removing the current class.

Upvotes: 0

Blender
Blender

Reputation: 298146

Something like this? http://jsfiddle.net/HbezN/11/

Some tips:

  • Don't use jQuery in place of CSS. Use CSS in place of CSS.
  • Go easy on the class names. You'll get confused later on.

Upvotes: 1

Related Questions