I am thinking about the situation, how to know, where an user clicked to DIV.
<div class="abc">
<a href="#" class="def">xxx</a>
</div>
$("div.abc").live('click', function(e) {
alert('message');
})
If I will use this part of code, so if I will click somewhere into the DIV.ABC, so I will get the alert message message. This is okay.
But I need this message only in the moment, when a user’ll click to the place into DIV.ABC, NOT ON THE A ELEMENT, THAT IS IN THE DIV.ABC. Is possible to do it?
Thanks in advance 😉
EDIT:
Sorry guys, I apologize to you. Of course, everywhere in my script are the letters lower. My Problem is, how to ignore alert(‘message’), when I will click on the anchor in div.abc
Try –
Demo – http://jsfiddle.net/ipr101/RJHDy/