useCapture=true?
by shapeshifta
HTML
<ul>
<li></li>
<li></li>
<li><a href="#"><span id="t">This is it</span></a></li>
<li></li>
</ul>
JavaScript
//useCapture=true Beispiel?
$(function() {
$('*').each(function() {
var current = this;
this.addEventListener('click', function(event) {
console.log('Capture for ' + current.tagName + '#' + current.id + ' target is ' + event.target.id);
}, true);
this.addEventListener('click', function(event) {
console.log('Bubble for ' + current.tagName + '#' + current.id + ' target is ' + event.target.id);
}, false);
});
});