Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #18633

Convert anonymous function to namned function

From "Tony" <tony.johansson@inport.com>
Newsgroups comp.lang.javascript
Subject Convert anonymous function to namned function
Date 2013-02-26 10:07 +0100
Organization A noiseless patient Spider
Message-ID <kghtu0$kdo$1@dont-email.me> (permalink)

Show all headers | View raw


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
$('#meetings').dblclick(Foo(e));
function Foo(e)
   {
         alert("testing in Foo");
   }

//What have I missed here ?

//Tony


Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


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