The function 'force' belongs to the document.ready call, so as soon as
that's done 'force' is destroyed.

If you put it outside of the document.ready, the function exists
globally for all javascript in the page.

On Jan 16, 9:13 am, tlob <[EMAIL PROTECTED]> wrote:
> hm... why? can you explain me in detail why its not working that way?
> I like to learn.
>
> I uploaded it:http://www.lightwavers.net/dadda/
>
> click joda, the icons should appear and start whirling around like
> this:http://www.ontoinfo.com/2006/09/22/javascript-flying-pictures-effect/
>
> thx
> tl
>
> On Jan 15, 7:52 pm, Feijó <[EMAIL PROTECTED]> wrote:
>
>
>
> > try with force function outside $...ready
>
> > Feijó
>
> > ----- Original Message -----
> > From: "tlob" <[EMAIL PROTECTED]>
> > To: "jQuery (English)" <jquery-en@googlegroups.com>
> > Sent: Tuesday, January 15, 2008 4:11 PM
> > Subject: [jQuery] simple newbie js function problem...
>
> > > script type="text/javascript">
>
> > > $(document).ready(function(){
>
> > > function force(){
> > > doStuffHere...}
>
> > > $('#joda').click(function () {
> > > $('img').show();
> > > setInterval('force()',500);
> > > });
>
> > > });
> > > </script>
>
> > > if I click #joda I got the Error: force is not defined.
>
> > > hmmm.
> > > I have some basic misunderstanding here...
>
> > > THX in advance!
>
> > > cheers
> > > tlz- Hide quoted text -
>
> - Show quoted text -

Reply via email to