Tuesday, January 27, 2009

[jQuery] Re: can i call ready function more than one time in a html page

> 1. I want to know can we execute ready function twice in a html page?
> If we execute, does it affect the functionality of ready function.
>
> 2. I have one main js file that's included in each page and after this
> i want to include js file specific to each pages.
> And i also want to write ready function in specific pages. is it
> okay?

Yes, that is perfectly fine. You can call the ready function as many
times as you like, even after the page is ready.

http://docs.jquery.com/Tutorials:Multiple_%24(document).ready()

No comments: