Commit graph

76 commits

Author SHA1 Message Date
Ariel Flesler 4ca4ce52f7 jquery event: Closes #3662. Adds a jQuery.Event class. Makes trigger and fix simpler. Adds currentTarget attribute to event objects. Event object isn't passed as part of data. 2008-12-25 21:44:54 +00:00
John Resig 77477d5634 Disabled native event triggering (and, thus, bubbling) for global events. 2008-12-22 14:47:34 +00:00
John Resig c03a280155 Added a new liveQuery/event delegation hybrid method: .live and .die. Easily adapts event delegation to the jQuery style. $("div").live("click", fn); $("div > #foo").live("submit", fn); $("div").die("click"); 2008-12-22 04:59:34 +00:00
John Resig 25885e07b2 Added support for bubbling triggered events. 2008-12-22 01:57:06 +00:00
John Resig b850ab2b8e Added the new jQuery.support object and removed all uses of jQuery.browser from within jQuery itself (while simultaneously deprecating the use of jQuery.browser). 2008-12-21 21:22:44 +00:00
John Resig 80a6a91347 Fixed a problem with multi-namespaced events not targetting the correct functions for execution. 2008-12-19 06:49:44 +00:00
John Resig 0935f4a0b1 Removing remaining strict-mode warnings. 2008-12-19 04:36:28 +00:00
John Resig 77344f4c50 Added support for multiple-namespaced events (in bind, trigger, and unbind). 2008-12-19 04:34:12 +00:00
John Resig 4c1e12e889 Simplifying the DOM ready code, no longer attempting to handle stylesheet loading. Closes #2614. 2008-12-19 04:29:48 +00:00
John Resig ab551c2b14 Standardized the type checks across core. isFunction and isArray now use Object.prototype.toString to verify the type, .constructor use was removed in favor of typeof, typeof checks now use ===, undefined checks use === undefined. All of this is outlined in the new style guidelines: http://docs.jquery.com/JQuery_Core_Style_Guidelines#Type_Checks. Fixes bug #3618. 2008-11-17 16:32:05 +00:00
John Resig 3b1cf91fa4 Landed the patch, by Diego, that 1) Removes browser sniffing from the ready code and 2) Provides some form of fallback DOM Ready for Iframes in IE. Closes #2614. 2008-11-12 13:18:47 +00:00
Ariel Flesler ad54d14ae5 jquery event: extra for #3498. Using the new mouse(enter|leave) shortcuts in $.fn.hover. 2008-10-22 10:06:54 +00:00
Ariel Flesler 69cbcf8637 jquery event: closes #3498, adding $.fn.mouseenter & $.fn.mouseleave. 2008-10-21 01:49:11 +00:00
Ariel Flesler aa9236e5ea jquery event: closes #3355. Added stopImmediatePropagation() to events. 2008-10-18 22:46:04 +00:00
Ariel Flesler 31293063fa jquery event: closes #3127. jQuery.event.special built-in methods were optimized. The mouse(enter|leave) special case is only added for non-IE browsers.Thanks to Mike Helgeson for his help. 2008-07-28 18:31:25 +00:00
Ariel Flesler b36fe4686c jquery event: closes #3112. It wasn't possible to bind 'data' to special events. 2008-07-09 21:38:28 +00:00
Ariel Flesler 112f7b15ae jquery event: Optimization to global unbinding on window unload. Thanks Mike Helgeson. 2008-07-01 02:50:38 +00:00
Ariel Flesler cf78e396db jquery event: closes #3107. Optimization to global event triggering. Thanks Mike Helgeson. 2008-07-01 02:25:55 +00:00
Ariel Flesler 18d3e75945 jquery event: fixed a typo in a comment. 2008-06-27 14:17:28 +00:00
Ariel Flesler abb055bb49 jquery event: caching the props array and fixing the loop that goes thru it. It was accessing an invalid index. 2008-05-28 20:43:13 +00:00
Ariel Flesler 3f5ff3097c jquery: removing unnecessary trailing and leading spaces & tabs. 2008-05-13 01:45:58 +00:00
Ariel Flesler 20a7bff401 jquery event & fx: tidying some comments. 2008-05-13 01:42:35 +00:00
Ariel Flesler 99101e02f9 jquery fx & event: replaced the use of .apply(), where .call() could had been used. 2008-05-12 19:45:02 +00:00
Ariel Flesler ca73ba5668 jquery event: removing 3 unnecessary lines since the addition of $.event.proxy. 2008-05-08 16:10:47 +00:00
Brandon Aaron 4b970deacd Making sure originalTarget gets copied over from the original event object 2008-05-07 13:21:16 +00:00
Ariel Flesler 17b1e407d1 mainly made the code shorter:
- removed some needless if's
- replace multiple "var x" for one, comma separated declaration.
- added a local fn called now() for the (new Date)s
- fixed the indentation of a block, and a typo in a comment.
- used fn instead of prototype where possible
- jquery fx: exposed the speeds hash as jQuery.fx.speeds.

Also fixed (again) line endings
2008-04-29 23:34:50 +00:00
Ariel Flesler aaff17be42 jquery event: from #2249, adding $.event.proxy to link event handlers, and implementing it on $.event.add, $.fn._toggle and $.fn.one.
It also fixes a bug in $.fn.one that was unbinding ALL the existing handlers.
2008-04-29 22:06:54 +00:00
Ariel Flesler 08836acc30 jquery event: adding some whitespaces to the last change. 2008-04-29 21:37:41 +00:00
Ariel Flesler c3cbc5bf98 jquery event: jQuery.toggle can accept more than 2 functions, closes #2378 2008-04-29 21:35:35 +00:00
Brandon Aaron f3f3238c53 jQuery.event.fix performance boost. An example: click event was previously ~3ms and is now < 1ms. jQuery.event.trigger also got another small boost in performance. 2008-04-28 21:09:27 +00:00
Brandon Aaron b84b997ea4 Prevent a single event object from being fixed more than once 2008-04-27 23:08:31 +00:00
Brandon Aaron 77bb2c505f Optimization for jQuery.event.fix ... don't send fake event through jQuery.event.fix 2008-04-27 20:37:58 +00:00
Ariel Flesler 25f9974cee jquery core: simplified the code using the new jQuery.makeArray from [5314] where possible. 2008-04-24 21:46:22 +00:00
Brandon Aaron 2efd0b4cc5 Fixed regression with 5276 where return false in first handler of multiple handlers was ignored. And 5276 log message says 200% but I meant 20%. 2008-04-23 18:57:17 +00:00
Jörn Zaefferer 32b1cb3a5c jquery.event: Patch for #2708 2008-04-22 21:59:40 +00:00
Brandon Aaron 6d28ebff85 Some small optimizations to the event module. jQuery.event.trigger over 200% faster in IE and less code. Thanks in large to Ariel Flesler. 2008-04-22 05:23:55 +00:00
Brandon Aaron 5d033dba02 Trigger onclick handlers of links 2008-04-21 20:39:17 +00:00
Scott González 75cb0d8d05 Fixed .unbind('.namespace'). 2008-02-05 19:32:00 +00:00
John Resig 703e89ba30 Added support for .unbind(".test") to unbind all namespaced events on an element. 2008-02-03 04:33:11 +00:00
John Resig 77da94552e Added $().data(), $().removeData(), and .bind("click!"). .data() and .removeData() handle namespaced data, .data() triggers a "set-KEY" event on all modified elements, and .bind("click!") only triggers a click (and no namespaced events). 2008-02-03 04:05:24 +00:00
John Resig 709df93304 Added a fix for bug #2140. Opera doesn't like concating null or undefined values. 2008-01-14 18:46:44 +00:00
Yehuda Katz 87d6bcec31 Fixes bug with charCode, bad 'var' and missing semicolon 2007-12-28 19:08:36 +00:00
Brandon Aaron c73eadf599 Fixed memory leak in IE with non-native event types 2007-12-21 04:53:33 +00:00
Brandon Aaron fde3d616ac Removed check to prevent event from being fixed twice. Unfortunately, in IE this is sometimes necessary with its global event object. Binding both a mousedown and mousemove event is an example. 2007-12-21 02:11:26 +00:00
Brandon Aaron bdd6aca209 Fixing #2081 2007-12-20 19:31:02 +00:00
David Serduke 0419455473 Changed the $(document).ready() code to try and solve some problems in Safari, Opera, and IE. 2007-12-20 06:00:01 +00:00
Brandon Aaron a7dfbb55d9 Short-circuit jQuery.event.fix if it has already fixed the current event object. 2007-12-19 18:35:58 +00:00
David Serduke 3bb82a34de Second part of the fix for #2071. An empty string "" was being sent to .bind() and when the events were being cleared it went in to an infinite recursive loop till memory was out. The test was !types in the function and changing it to types == undefined fixed the error. 2007-12-19 01:48:05 +00:00
David Serduke 1d7b7b94ef Changed CRLF end of lines to just LF. Other than that there were no changes in this commit. Try svn diff -x --ignore-eol-style -r 4224:4225 to see that. 2007-12-19 01:10:20 +00:00
Richard Worth 76c1889e22 Fixed #1887 - trigger fails if extra is not a function 2007-12-18 03:13:39 +00:00