vendredi 24 février 2017

not selector inside parent element

I need console.log if .overtitle is clicked, but excluding the checkbox inside. If checkbox is clicked I need just it to be checked/unchecked, without console.log.

This is what I tried, but it doesn't work. Clicking on the checkbox fires console.log.

$('.overtitle').not('.checkpart').click(function() {
  console.log('323');
});
<script src="http://ift.tt/1oMJErh"></script>
<div class='overtitle'>
  <input class='checkpart' type="checkbox" name="part" value="banner00">
  BANNERS
</div>



Aucun commentaire:

Enregistrer un commentaire