dantheman50_98 — 2010-10-10T11:44:28-04:00 — #1
- I've got a list similar to the following:
- Item 2-5 needs to have a class added either to the a or the li using jquery I've tried the following but it isn't working:
I'm new to this jquery malarkey so I'm shooting in the dark somewhat here so if anyone can point me in the right direction is would be most appreciated.
I should mention that there'll be a few of these nested lists, the parents (li) of which will all need a class added via jquery.
dantheman50_98 — 2010-10-15T04:25:29-04:00 — #2
I know I originally gave incorrect details and I apologise for that. If what I'm trying to achieve really isn't possible then please tell me so I'm not going on a wild goose chase. Thanks.
dantheman50_98 — 2010-10-10T15:10:10-04:00 — #3
Thanks for the suggestion but there'll be other subcategories created over time by my client and ideally I need a method of adding the class regardless of the link each time a new subcategory is added.
dantheman50_98 — 2010-10-10T19:28:48-04:00 — #4
Good grief yes! Sorry, I'm overworked and underslept...that's my excuse anyway. Yes that is exactly what I want styled and I'm sorry to send you on a wild goose chase.
oddz — 2010-10-10T13:09:23-04:00 — #5
oddz — 2010-10-10T17:46:14-04:00 — #6
How will the current link be determined?
dantheman50_98 — 2010-10-13T16:24:22-04:00 — #7
Any ideas? I'm still somewhat at a loose end with this menu and some more help would be most appreciated.
oddz — 2010-10-10T19:06:17-04:00 — #8
In that case wouldn't you want the class added to item-2, instead of item-2-5?
dantheman50_98 — 2010-10-10T18:23:46-04:00 — #9