I'm trying to bind an event for any child within any children in a div except for a specified child with the following:
$(document).ready(function(){
$("#holder").find('*').each(function(){
if($(this).context.nodeName !== "SPAN"){
$(this).click(function(){
window.console.log('s');
});
}
});
});
However, because the SPAN is within an element, the click event is still being called. Is there any way around this?
I have a demo on JSBin