Recently I have some problems with jQuery. Let's just say I have elements like this:
<div id="parent1" class="parent">
<div id="child1" class="children">
<a href="" id="child_link1" class="child_link"></a>
</div>
</div>
and I have jQuery function like this:
$(".parent").click(function(){
alert("parent is clicked");
});
$(".child_link").click(function(){
alert("child link is clicked");
});
If I click the child_link, parent will be triggered too. How can I create a situation where if I click the child_link, parent won't be triggered?