Ruby JavaScript Classes

Rails has JavascriptHelper but can you recommend other packages that
make it easy for the Ruby programmer to create JavaScript on web pages?

Mike S. wrote:

Rails has JavascriptHelper but can you recommend other packages that
make it easy for the Ruby programmer to create JavaScript on web pages?

I suggest you write native Javascript using jQuery - you’ll be glad you
did. jQuery lets you work at the level of CSS selectors, e.g.

$(’.someclass’).hide(); // hide all elements with class someclass

The half-way house: install jRails and then the Rails helpers will
output jQuery instead of Prototype.

Brian C. schrieb:

I suggest you write native Javascript using jQuery - you’ll be glad you
did. jQuery lets you work at the level of CSS selectors, e.g.

$(’.someclass’).hide(); // hide all elements with class someclass

The same with Prototype looks like this:

 $$('.someclass').invoke('hide');

jQuery is not as much better than Prototype as many people believe that
just don’t know Prototype.

In the german JS-newsgroup the one and only answer to the question
‘which JS-framework should I use?’ is ‘write your own. The existing ones
are all bullshit’…

R.

I can recommend Prototype as well.

Also, there’s this great talk by a person who KNOWS about JS:

(I know it’s an hour long, but I really took some lessons out of it. I
think
it’s worth the time investment)

and his great tool:

that helped me remove a lot of errors from my javascript stuff…

In the german JS-newsgroup the one and only answer to the question
'which

JS-framework should I use?’ is ‘write your own. The existing ones are all
bullshit’…

I like that one :wink:

There are tons of frameworks out there, just pick one that has the kind
of
syntactic sugar you favor…
Greetz!