I have the following markup
<div id="FirstDiv">
<div class="MyClass">
<span>
<a href="#">link 1</a>
<a href="#">link 2</a>
</span>
</div>
</div>
<div id="SecondDiv">
<div class="MyClass">
<span>
<a href="#">link 1</a>
<a href="#">link 2</a>
</span>
</div>
</div>
How can I select alla the <a>
tag elements inside the DIV "SecondDiv"?
Actually I am doing
$(".MyClass > a").click(function (event) {
but this would select also links of the first div.