Mathias,
>Don't register your ready functions like this:
>
>$(document).ready(...);
>
>Register it like this:
>
>$(document).bind("ready",...);
>
>Now, trigger the ready event:
>
>$(document).trigger("ready");
>
>This works. I think, it's a bit confusing, because $(document).ready
>is an event (a
Ok, it's quite easy to recall ready:
Don't register your ready functions like this:
$(document).ready(...);
Register it like this:
$(document).bind("ready",...);
Now, trigger the ready event:
$(document).trigger("ready");
This works. I think, it's a bit confusing, because $(document).ready
Well, I have an ajax call to the server. The sever decides what to do.
Normally, there is just one small part of the page, which will be
changed per json. But there is one possibility, which needs to refresh
nearly the complete page. No I have to recall ready. There are three
possibilites:
1. I c
don't use an anonymous function with ready. use a named one, and then just
call it again (and again).
On 5/29/07, Brandon Aaron <[EMAIL PROTECTED]> wrote:
ready() is just a special method that handles the DOM Ready event. I
can't think of a use-case where one would need to force the call to
re
Mathias,
The solution is simplier than it seems.
function foo(){...}
$(document).ready(foo);
//someplace where you want to call the document.ready again
foo();
By wrapping the code that you want to call from document.ready inside
a function it is easy to call again at any time.
Of course if
ready() is just a special method that handles the DOM Ready event. I
can't think of a use-case where one would need to force the call to
ready but you can do so by calling jQuery.ready(). Once the function
runs, it won't run again.
I'm not sure what, if any, the consequences of doing this are. P
6 matches
Mail list logo