I have the following code:
$(".teste").click(function() {
return false;
});
In this div .teste
I have links with class .link
and I want the return false
to occur when I click on the div, but that return false
does not occur if I click on the links ( .link
) which are within the div. Already tried:
$(".teste").not("a.link").click(function() {
return false;
});
I also tried:
$(".teste:not(a)").click(function() {
return false;
});
But both did not work.
HTML (example):
<div class="teste">
<div class="outradiv"></div>
<div class="maisumadiv">
<a href="/teste" class="link">Link...</a>
</div>
</div>