Skip to content

Instantly share code, notes, and snippets.

@sebs
Created October 28, 2010 12:40
Show Gist options
  • Save sebs/651252 to your computer and use it in GitHub Desktop.
Save sebs/651252 to your computer and use it in GitHub Desktop.
Clicking the clickchickstick ;)
<html>
<style>
#outer {
background-color: pink;
padding:20px;
}
#middle {
background-color: green;
padding:20px;
}
#inner {
background-color: blue;
padding:20px;
}
</style>
<body>
<div id="outer">
<div id="middle">
<div id="inner">
Inner
</div>
</div>
</div>
</body>
<script type="text/javascript">
var cb = function(params) {
console.log(params.target.id);
// alert('klick')
};
document.addEventListener('click', cb, false);
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment