| |
Low Pro |
Some people argued that one could do the same with something like: var initEvents = function(behaviors){ $(document).ready(function(){ event = ruleAndEvent[1]; initEvents({ alert("Hello World!"); event.preventDefault(); 'p.hide_myself:click': function() { I'm personally really excited, especially with the new Merb release coming -Matt On 1/28/08, Dan Webb <d...@danwebb.net> wrote: > On 1/28/08, Peter <peter.kielt...@gmail.com> wrote: > From looking at that there's not a huge amount in it. In my > But yeah, back to the original point. If you do like Mootools and > Cheers, > -- > aim: danwrong123
/* Add behaviors to the document when it's ready */
var ruleAndEvent, rule, event, key, fn;
for(key in behaviors){
fn = behaviors[key];
ruleAndEvent = key.split(":");
rule = ruleAndEvent[0];
$(rule)[event](fn);
}
});
'a.alert_hello_world:click': function(event){
},
// this refers to the paragraph being clicked
$(this).hide();
}
being ported to JQuery, he just whished you were using click instead of
onclick.
up, I believe JQuery will grow in the Ruby community. I'll do my best to try
to see if I can come up with behaviors.
> > ... I like jQuery, and I'd prefer to use it because of its adoption
> > and support, but from this small subset of a test, it does not perform
> > well at all. Reading the jQuery blog, they've taken on a developer to
> > optimize their code, I'm looking forward to seeing what they come up
> > with.
> experience, since all the selector engines jumped up in performance a
> while ago framework speed is not a problem. High performance is
> normally achieved at application level. Doing things like using event
> delegation, lazy evaluation and generally writing code in a way that
> makes for the least amount of work possible is what really counts.
> Even before the selector speed up it wasn't a huge problem - you just
> needed to be careful with what selectors you used. However, I say
> this from my experience. So although I work on a lot of pretty JS
> heavy applications I've never felt the need to write a raytracer in JS
> or something similar.
> want to port Low Pro then that would be cool. It's already got a
> class implementation which is most of what Low Pro JQ's code is so its
> probably going to be very simple to do.
> Dan Webb
> http://www.danwebb.net
> skype: danwrong