Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #18635
| From | "Tony" <tony.johansson@inport.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Convert anonymous function to namned function |
| Date | 2013-02-26 10:38 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <kghvp8$tc6$1@dont-email.me> (permalink) |
| References | <kghtu0$kdo$1@dont-email.me> <kghv7t$qkc$1@dont-email.me> |
yes it's called only once but why ?
I mean I have created an event handler Foo for wiring up the double click on
the meetings so
why is not Foo called when double click in the meetings ?
//Tony
"Gregor Kofler" wrote in message news:kghv7t$qkc$1@dont-email.me...
Am 2013-02-26 10:07, schrieb Tony:
> Here I have an anonymous function which is working
> $('#meetings').dblclick(function (e)
> {
> //Code to be moved to a named function
> alert("testing");
> });
>
> and here I have tried to use a named function called Foo in this way but
> it's not working
Let me guess: You get an alert "when running", then "never again"? Hopeless.
> $('#meetings').dblclick(Foo(e));
> function Foo(e)
> {
> alert("testing in Foo");
> }
$('#meetings').dblclick(Foo);
Gregor
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Convert anonymous function to namned function "Tony" <tony.johansson@inport.com> - 2013-02-26 10:07 +0100
Re: Convert anonymous function to namned function Gregor Kofler <usenet@gregorkofler.com> - 2013-02-26 10:29 +0100
Re: Convert anonymous function to namned function "Tony" <tony.johansson@inport.com> - 2013-02-26 10:38 +0100
Re: Convert anonymous function to namned function "Tony" <tony.johansson@inport.com> - 2013-02-26 10:42 +0100
Re: Convert anonymous function to namned function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-26 12:08 +0100
csiph-web