git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Expose the sort/unique code from Sizzle as Sizzle.uniqueSort().
[jquery.git]
/
src
/
event.js
diff --git
a/src/event.js
b/src/event.js
index
fdf61ba
..
230af19
100644
(file)
--- a/
src/event.js
+++ b/
src/event.js
@@
-240,7
+240,8
@@
jQuery.event = {
var all, handlers;
event = arguments[0] = jQuery.event.fix( event || window.event );
var all, handlers;
event = arguments[0] = jQuery.event.fix( event || window.event );
-
+ event.currentTarget = this;
+
// Namespaced event handlers
var namespaces = event.type.split(".");
event.type = namespaces.shift();
// Namespaced event handlers
var namespaces = event.type.split(".");
event.type = namespaces.shift();
@@
-571,9
+572,14
@@
function liveHandler( event ){
}
});
}
});
+ elems.sort(function(a,b) {
+ return jQuery.data(a.elem, "closest") - jQuery.data(b.elem, "closest");
+ });
+
jQuery.each(elems, function(){
jQuery.each(elems, function(){
+ event.currentTarget = this.elem;
if ( this.fn.call(this.elem, event, this.fn.data) === false )
if ( this.fn.call(this.elem, event, this.fn.data) === false )
- stop = false;
+ return (stop = false);
});
return stop;
});
return stop;
@@
-637,7
+643,7
@@
function bindReady(){
// If IE and not an iframe
// continually check to see if the document is ready
// If IE and not an iframe
// continually check to see if the document is ready
- if ( document.documentElement.doScroll && typeof window.frameElement === "undefined" ) (function(){
+ if ( document.documentElement.doScroll && window == window.top ) (function(){
if ( jQuery.isReady ) return;
try {
if ( jQuery.isReady ) return;
try {