I recently had some problems with jQuery. Let's say I have these elements:
<div id="parent1" class="parent">
<div id="child1" class="children">
<a href="" id="child_link1" class="child_link"></a>
</div>
</div>
and I have a jQuery function as follows:
$(".parent").click(function(){
alert("parent is clicked");
});
$(".child_link").click(function(){
alert("child link is clicked");
});
If I click on child_link, the parent will also be launched. How to create a situation where, if I click on child_link, the parent will not be launched?
source
share