The .click () method works if you click on the child element.
How to make click work ONLY on an item?

    3 answers 3

    I will add the answer @markuper

    <div class='outer'> <div class='inner'> </div> </div> 

    Further

     $('.outer') .click(function(){ // вешаем основной обработчик на родителя alert('outer'); }) .children() .click(function(e){ // вешаем на потомков e.stopPropagation(); // предотвращаем всплытие }); 

    proof

      e.stopPropagation - to cancel distribution not to descendants, but to parents, if on parents where the click handler hangs it will work, if not cancel. To click only on the element you need to check the target for which you clicked. $ (e.target) .is ('a') - for example.

        There was a similar situation, the css property helped: pointer-events: none; This is not a panacea, but sometimes it can be useful.