views:

78

answers:

2

Hi fellow programmer

I want to select an anchor inside a div like this

<div class="response content">
  Disapproved Bank Mandiri<br><br>
  <p>
    <a class="showlist" href="#">Back to list?</a>
  </p>
</div>

What is the jquery to do this ?

+2  A: 

If you require both classes on the DIV:

$("div.response.content a.showlist");

If not,

$("div.response a.showlist");

To learn more about basic usage of jQuery Selectors, visit http://api.jquery.com/category/selectors/

Jonathan Sampson
+1  A: 

Any anchor in a div with "response" and "content" classes:

$('.response.content a')

Or only anchors with a class of "showlist":

$('.response.content a.showlist')
awgy