Hmmm, would it be standard procedure to put $(window).load() within $
(document).ready()?

Also, anyone know of any basic class examples for jQuery?

Thanks! :)
Cheers,
Micky

On Dec 13, 12:14 am, Micky Hulse <[EMAIL PROTECTED]> wrote:
> Just wondering what would be the best way to handle shared variable(s)
> between different events... for example:
>
> var ele = '#foo';
> $(document).ready(function() {
>         $(ele). // ... Do something with 'ele'...});
>
> $(window).load(function () {
>         $(ele). // ... Do something with 'ele'...
>
> });
>
> To me, the above seems a little sloppy... Is there a good way to
> contain the variable "ele" within it's own (relevant) namespace?
>
> Maybe I should be learning/reading about classes (OOP) and jQuery?
>
> Am I thinking too hard about this? :D
>
> I would greatly appreciate tips and/or suggestions.
>
> Have a great day/night!
> Cheers,
> Micky

Reply via email to