<div> <a> Text1 <img alt="" stc="" /> </a> <a> Text2 </a> </div>
I want to select all a elements that have text=text2. I looking for something like that:
$('a[text=Text2]')
Edit: Why this is not working? (from some reasons it's need to be in this format).
$('div').find('a').find(':contains("Text2")')