RE: [Proto-Scripty] Binding functions to $$ directly

2010-05-10 Thread Jonathan Rosenberg
How 'bout $$('#div1 p span.someclassName').invoke('observe', 'click', function(el) Close enough? -- Jonathan Rosenberg Founder Executive Director, Tabby's Place http://www.tabbysplace.org/ -Original Message- From: prototype-scriptaculous@googlegroups.com

Re: [Proto-Scripty] Binding functions to $$ directly

2010-05-10 Thread Walter Lee Davis
jQuery conflates the meaning of $ and $$ in a useful manner, but Prototype provides the invoke function to shortcut what you are doing here. $$('#div1 p span.someclassName').invoke('observe','click', function(el) { alert('b'); }); To my mind, it's a little less magic and a lot more

Re: [Proto-Scripty] Binding functions to $$ directly

2010-05-10 Thread Alex McAuley
: [Proto-Scripty] Binding functions to $$ directly jQuery conflates the meaning of $ and $$ in a useful manner, but Prototype provides the invoke function to shortcut what you are doing here. $$('#div1 p span.someclassName').invoke('observe','click', function(el) { alert('b'); }); To my mind