Rails3 and unobtrusive javascript

Ok to not depend on a specific javascript framework but now its’ hard
for me to reproduce the same behavior of some helpers like
observe_field.
I’ve found some jquery examples but all use the event change that is
triggered only when the text field loses focus.
It’s not the same behavior as observe_field.
There is someone in the same situation?

Msan M. wrote:

Ok to not depend on a specific javascript framework but now its’ hard
for me to reproduce the same behavior of some helpers like
observe_field.
I’ve found some jquery examples but all use the event change that is
triggered only when the text field loses focus.
It’s not the same behavior as observe_field.
There is someone in the same situation?

Unobtrusive JavaScript and JavaScript agnosticism are really two
separate and unrelated issues.

Unobtrusive JavaScript is the “new hotness” because from a design
standpoint it makes a lot of sense. From what I can gather it seems that
most developers are trending away from the built-in helpers and doing
more with pure JavaScript.

I’ve not worked with Rails 3’s unobtrusive JavaScript to know the issues
involved. Bu, I do use unobtrusive techniques wherever possible, which
seems to be pretty much everywhere.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs