E.g
I am not fire when click me
$(\'.container\').click(function(){
As a more general solution, you should check e.target in container
's click
event handler.
$('.container').click(function(e) {
// If you want to ignore clicks to anything inside the `.container` div:
if (!$(e.target).hasClass('container')) return;
// or, if you only want the `.inside` div to not fire the event,
if ($(e.target).hasClass('inside')) return;
// container do something here
});
This way you're not preventing propagation of the event, which would break bound live handlers.