On Thu, Jun 5, 2008 at 5:59 PM, Kevin Triplett <[EMAIL PROTECTED]> wrote: > I've fallen in love with jQuery and have been making my > forms work first without any javascript and then enabling js > and hooking into the form using CSS selectors.
Absolutely! I always make sure the site functions in the absence of JS, and "hooking into" the markup unobtrusively is definitely the way to go. That's why the stuff built into Rails makes me feel a little dirty, what with its inline event handlers. I've dabbled with jQuery a bit--I really dig it (I've toyed with moving most of my JS dev to it)--but I wanted to try to do it "the Rails way," which seems to mean Prototype. So I have to ask ... is jQuery gaining traction among Rails devs? > jQuery has a > nice ajax design with callbacks and such but I'm sure > prototype has the same functionality. Yep. Prototype's Ajax support does indeed rock. Here's another example of the sort of issues I'm dealing with; I'd appreciate any insight you could offer into how you approach the problem. So I've got a list on the page, and I'm hooking in Ajax to append items to that list dynamically. Right now, I've got a partial that outputs the markup for the list item, and I simply render the same partial when a JS request comes in. Is that a good approach? Or should I try to divorce my JS from the back end a little more, by (say) rendering a generic JSON object when the request comes in, and then building the DOM elements in the JS's Ajax handler? Any thoughts are appreciated! :Dan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/heroku?hl=en -~----------~----~----~----~------~----~------~--~---
