Paul,
Either is fine; JQuery will happily execute one or more ready statements. If
you have multiples, they will be executed in the order in which they are
encountered in the code.
I personally use a modular approach, since different pages may utilize only a
portion of the available functions. My attitude is, why load what isn't used?
Of course, YMMV (your mileage may vary).
Welcome to JQuery!
Kevin
-------------- Original message ----------------------
From: "Caton, Paul" <[EMAIL PROTECTED]>
> Please forgive what might seem a stupidly basic question but I'm new to
> jQuery and the tutorials/API doc have not made the answer clear to me:
>
> Should you use a separate
>
> $(document).ready(function(){
> // Your code here
> });
>
> for each function you write, or do you just have one wrapping "ready
> statement" and put all your functions inside it?
>
> Thanks,
>
> Paul Caton.
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/