Skip to content

Instantly share code, notes, and snippets.

@kruppel
Created November 8, 2013 19:48
Show Gist options
  • Save kruppel/7376551 to your computer and use it in GitHub Desktop.
Save kruppel/7376551 to your computer and use it in GitHub Desktop.
Discount Bubble Check
var el = document.activeElement;
function bubbleCheck(element) {
var checking = element;
checking.addEventListener('click', function(e) { console.log(checking); }, false);
}
while (el = el.parentNode) { bubbleCheck(el); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment