That's what I tried initially - though for some reason didn't seem to work!

Out of interest  - what technique are folks using to create the dom
elements?
raw HTML?
domBuilder?

Dave





Klaus Hartl wrote:
> 
> dmoshal schrieb:
>> Karl, using object literals seems to work:
>> 
>> var a = 
>> {
>>     foo: function()
>>     {
>>     }
>> }
>> 
>> function bar (a)
>> {
>>      $(elem).click (a.foo)
>> }
>> 
>> bar (a)
>> 
>> 
>> Dave
> 
> And that of course is exactly the same as this:
> 
> function foo() {
> 
> }
> 
> function bar(a) {
>      $(elem).click(a);
> }
> 
> bar(foo);
> 
> 
> -- Klaus
> 
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

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


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

Reply via email to