1
I have the following code:
$(".teste").click(function() {
return false;
});
Inside that div .teste
I have links with the class .link
and I want, when clicking on the div, the return false
, but that the return false
if I click on the links (.link
) that are inside the div. I’ve tried:
$(".teste").not("a.link").click(function() {
return false;
});
tried as well:
$(".teste:not(a)").click(function() {
return false;
});
But they both didn’t work.
HTML (example):
<div class="teste">
<div class="outradiv"></div>
<div class="maisumadiv">
<a href="/teste" class="link">Link...</a>
</div>
</div>
Could you put your HTML code too to better understand the situation?
– Ulysses Alves
I added an example
– Igor
In addition to HTML also put CSS, or else a fiddle with your code
– Gildonei