Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the jQuery selector for selecting anchor elements with a particular class in a particular div

I have some code like this and I want to select every <a> tag with the class status in the div foo

<div id="foo">
...
<a class = "status"> ... </a>
...
</div>
like image 840
abc def foo bar Avatar asked Dec 17 '22 17:12

abc def foo bar


1 Answers

You can do this $('#foo').find('.status')

like image 162
Hussein Avatar answered Jan 25 '23 23:01

Hussein