I need to fire an event after stopPropagation has been called.
I am hiding the div on html click and when someone clicks on the notif_noti
button I am showing the div which then loads some items with the id #freq
.
The problem is #freq
will be inside #notification_load
which is inside of #notification_box
and the stopPropagation
is attached to #notif_noti
and also #notification_box
so basically when you click on these two items it will not fire the event I am trying to fire. e.g you can not .click()
on #freq
because it will not register because it is inside of #notification_box
Hopefully someone can help me as to how to achieve this. If you do not understand I will try to rewrite this for you.
Thanks
$("#notif_noti, #notification_box").click(function(event){
event.stopPropagation();
});
$("#notif_noti").click(function() {
$("#notification_box").show();
$("#notification_load").html('<div style="width:100%; text-align:center; height: 20px;line-height: 50px;padding-top: 20px;padding-bottom: 20px;color: #999;"><i class="fa fa-circle-o-notch fa-spin" style="font-size:20px;"></i></div>');
});
$("html").click(function() {
$("#notification_box").hide();
});
<div id='notification_box'>
<div id='notification_arrow'></div>
<div id='notification_hd'>
<span id='notification_header' style='padding-left:05px;'></span>
</div>
<div id='notification_load'></div>
</div>