I have a DIV with a classed foobar
, and a few DIVs inside that DIV that are unclassed, but I suppose they are inheriting the foobar
class:
$('.foobar').on('click', function() { /*...do stuff...*/ });
I want that to fire off only when clicking somewhere in the DIV but not on its children DIVs.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…