T.J. Crowder
2010-10-03 16:33:03
That returns the id of the link, not its parent.
Alec
2010-10-03 16:34:40
@Alec: I realized as I clicked post and fixed it (even before your comment; overlap).
T.J. Crowder
2010-10-03 16:35:49
+2
A:
What you've suggested should work - but I'd simplify it to:
$('#mainNav .selected').parent().attr('id');
(Did you actually try your suggestion?)
Dexter
2010-10-03 16:33:10
@TheApprentice: Yeah, otherwise anything with the "selected" class inside that div would be fair game.
T.J. Crowder
2010-10-03 16:52:55