Ahhhh, many thanks Klaus, that does make a lot of sense...

I really appreciate the help from everyone. Many thanks all. :)

I am at work now, but will tweak my code later tonight with the newly
suggested changes.

Have a great day/night,
Cheers,
Micky

On Dec 13, 11:57 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> On 14 Dez., 08:55, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > On 14 Dez., 04:47, "Erik Beeson" <[EMAIL PROTECTED]> wrote:
> > Try:
>
> > (function() {
> >   var $ele;
> >   $(document).ready(function() {
> >        $ele = $('#foo');
> >        $ele. // ... Do something with 'ele'...
> >   });
> >   $(window).load(function () {
> >        $ele. // ... Do something with 'ele'...
> >   });
>
> > })();
>
> Better try this:
>
> $(function() {
>   var $foo = $('#foo');
>   // ... Do something with $foo
>
>   $(window).load(function () {
>        // ... Do something with $foo
>   });
>
> });

Reply via email to