How to select an item inside "this" in jQuery?
I know if I can select an element this way:
$("ul.topnav > li.target").css("border", "3px double red"); but how can I do something like:
$(this > li.target).css("border", "3px double red"); +84
deb 01 Feb '11 at 10:16 2011-02-01 22:16
source share2 answers
I use this to get the parent, similarly for the child
$( this ).children( 'li.target' ).css("border", "3px double red"); Luck
+8
mchinta May 30 '13 at 9:49 2013-05-30 09:49
source share