Selecting a tag and class (jQuery)
Say I the following:
<div id = "thisOne">
<a href = "#" class="ui-state-highlight">abc</a>
<a href = "#'>def</a>
</div>
If i do $(".thisOne a") I get both "a" elements. I just want the one th开发者_如何学运维at is highlighted, how do I do this?
This two lines of code should help you, give them a try :
$("#thisOne .highlight")
and for the other
$("#thisOne :not(.highlight)")
This should do it: $('a.highlight');
精彩评论