#950 closed bug (wontfix)
jQuery.fn.ready should not pass in any params to the functions pushed onto readyList
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | core | Version: | |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
foo function(arg) {
alert(arg)
}
$("document").ready(foo);
ready is passing in a function to foo, so the function code is displayed. arg should be null. This is the expected behavior and is neccessary if foo is a shared function.
Change History (1)
comment:1 Changed 17 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Version: | 1.1a |
Note: See
TracTickets for help on using
tickets.
That's correct. We added this such that you could call jQuery by any name within your program scope. For example:
or:
So, yes, it doesn't behave like a normal event (in that it doesn't pass in an Event Object), but this event also isn't a normal event. In this case, we're taking advantage of that fact by providing an incredibly useful feature, for users who work in conflicting-code situations.