I have the following structure:

The whole rectangle is .msg_box and the little red X is .msg_del_x
The HTMl of that is (there are multiple of these boxes, all with the same class):
<div class="msg_box" msg_id="4">
<span style="font-size: 16px">Administartor</span><span class="msg_del_x" del_id="4" style="float: right; font-size: 20px; font-weight: bold; line-height: 0.6;">x</span><br>
<span style="font-size: 14px">d</span><span style="float: right; font-size: 11px; color: #444;">05.09.15</span>
</div>
This is the JS (without the red X)
$(".msg_box").click(function(){
var msg_id = $(this).attr("msg_id");
$(".msg_box").css("background-color", "#FFF");
$(this).css("background-color", "#EEE");
$("#msg_display").load("select.php?msg_id="+msg_id);
$("#msg_display").css("background-color", "#EEE");
})
This is my current JS for the red X .msg_del_x
$(".msg_del_x").click(function(){
//AJAX
});
The Problem
The problem is that if I click on any .msg_del_x the .msg_box is also clicked which starts the first JS I posted. And I don't want that.
If I click on the red X (.msg_del_x), the click-event of .msg_box shouldn't start.
I thought this could be made with hover-checks but this didn't worked for me too.