On May 29, 9:27 am, Martin Wawrusch <mar...@wawrusch.com> wrote: > I guess I am going to blog about this once I have a bit more time. > > In general my observation with websites and javascript is that you have lots > of code that applies to all pages if you structure it right (usage of class > names in css), and very few pages that have intense, page specific code. The > project I am working right now has about 1000 lines of coffeescript for the > search page and maybe 200 for the rest of the site (and some custom jquery > plugins), which makes solutions like the one I proposed rather save. The > class is attached to the body because I am following the *html5* > boilerplate.com/ > conventions.
I'd love to read it. I will try your way and see how it goes. The more I think about it, the more I like the "if exists on the page, then run it" strategy. I guess this would let you slap elements in and out of pages everywhere and the javascript will just continue to work. Pretty nice. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.