Update Semantic
Fixes #40,#24
This commit is contained in:
parent
1715f27f44
commit
2027b94179
621 changed files with 172488 additions and 15939 deletions
28
web/semantic/test/helpers/jquery-events.js
vendored
Normal file
28
web/semantic/test/helpers/jquery-events.js
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
(function($) {
|
||||
$.events = function(selector, root) {
|
||||
var s = [];
|
||||
$(selector || '*', root).addBack().each(function() {
|
||||
// the following line is the only change
|
||||
var e = $._data(this, 'events');
|
||||
if(!e) return;
|
||||
s.push(this.tagName);
|
||||
if(this.id) s.push('#', this.id);
|
||||
if(this.className) s.push('.', this.className.replace(/ +/g, '.'));
|
||||
for(var p in e) {
|
||||
var r = e[p],
|
||||
h = r.length - r.delegateCount;
|
||||
if(h)
|
||||
s.push('\n', h, ' ', p, ' handler', h > 1 ? 's' : '');
|
||||
if(r.delegateCount) {
|
||||
for(var q = 0; q < r.length; q++)
|
||||
if(r[q].selector) s.push('\n', p, ' for ', r[q].selector);
|
||||
}
|
||||
}
|
||||
s.push('\n\n');
|
||||
});
|
||||
return s.join('');
|
||||
}
|
||||
$.fn.events = function(selector) {
|
||||
return $.events(selector, this);
|
||||
}
|
||||
})(jQuery);
|
Reference in a new issue