I have a parent div which has a click action for any of its area. Inside this parent div, i have a child div also with a click action. When i select the child div, both click events fire.
How can i have it designate when child is clicked and not to fire parent click event?
HTML
<div id="Parent">
<div class="Child"></div>
</div>
CSS
#Parent
{
Width: 300px;
height: 300px;
background: #000;
}
.Child
{
Width: 100px;
height: 100px;
background: blue;
}
jQuery
$("#Parent").click(function () {
window.open('http://www.Google.com', '_blank');
});
$(".Child").click(function () {
window.open('http://www.Bing.com', '_blank');
});