// Vanilla js var ignoreMe = document.getElementById("ignoreMe"); window.addEventListener('mouseup', function(event){ if (event.target != ignoreMe && event.target.parentNode != ignoreMe){ // Place your output } });