thanks for the prompt responses.

the problem in more detail:

function bar(f)
{
   $(elem).click (f)
}

bar (new foo())


results in this error in Firebug:
-----------------
c[j].apply is not a function
handle(click clientX=0, clientY=0)
[Break on this error] if ( c[j].apply( this, args ) === false ) {

jquery-latest.js (line 999)
-----------------

Dave




AHeimlich wrote:
> 
> On 12/11/06, dmoshal <[EMAIL PROTECTED]> wrote:
>>
>> given: function foo(){}
>>
>> I want to assign it to the element's onclick handler:
>>
>> $(elem).click (foo)
>>
>> which doesn't seem to work?
>>
> 
> Well, that *should* work. Are you sure that there aren't any scope issues
> at
> play here? What kind of error messages (if any) are you getting?
> 
> -- 
> Aaron Heimlich
> Web Developer
> [EMAIL PROTECTED]
> http://aheimlich.freepgs.com
> 
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/passing-functions-tf2805241.html#a7826972
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to