diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2007-01-10 18:46:41 +0000 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2007-01-10 18:46:41 +0000 |
commit | c6e6e72561979ab80aaf5ce1ab63d3dd010382a3 (patch) | |
tree | 2b4870789bb9ed253a488b36fc66719e33388692 /src/jquery/jquery.js | |
parent | 7b439921c48070e7b01ebda3580e0ada01a082b5 (diff) | |
download | jquery-c6e6e72561979ab80aaf5ce1ab63d3dd010382a3.tar.gz jquery-c6e6e72561979ab80aaf5ce1ab63d3dd010382a3.zip |
Modified ready to event to pass jQuery object, allowing users to avoid the ugly custom alias pattern, added examples to both ready(Function) and $(Function)
Diffstat (limited to 'src/jquery/jquery.js')
-rw-r--r-- | src/jquery/jquery.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 46019bf94..ddcddce06 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -154,10 +154,18 @@ var $ = jQuery; * }); * @desc Executes the function when the DOM is ready to be used. * + * @example jQuery(function($) { + * // Your code using failsafe $ alias here... + * }); + * @desc Uses both the shortcut for $(document).ready() and the argument + * to write failsafe jQuery code using the $ alias, without relying on the + * global alias. + * * @name $ * @param Function fn The function to execute when the DOM is ready. * @cat Core * @type jQuery + * @see ready(Function) */ jQuery.fn = jQuery.prototype = { |