One more thing, don't forget to restart your server after following these steps :)
- Boris On Aug 27, 5:06 pm, Boris Masis <[EMAIL PROTECTED]> wrote: > Hi guys, > > I just did a little bit of work to remove prototype/scriptaculous from > Lovd By Less and replace it with jQuery/jQuery UI. jQuery is much > lighter than Prototype and already used in Lovd By Less. Following > these instructions will also greatly reduce the file size of the > javascript includes on your Lovd By Less install. > > 1. Install jRails, a drop-in jQuery replacement for Rails > fromhttp://ennerchi.com/projects/jrails. jRails essentially re-routes > rails helpers to use jQuery instead of prototype. > > On windows you would run the following in your Lovd By Less root > folder to install jRails: > ruby script\plugin > installhttp://ennerchi.googlecode.com/svn/trunk/plugins/jrails > > 2. Modify the headers in your app\views\layouts\application.html.erb > file and app\views\layouts\plain.html.erb file to remove prototype/ > scriptaculous and reference jQuery. I'm also using the google ajax API > to serve jQuery which reduces server load and allows for the > posibility of your user already having the library cached. > > Your headers in the application.html.erb and plain.html.erb should > look like this: > > <script src="http://www.google.com/jsapi"></script> > <script> > google.load("jquery", "1.2.6"); > google.load("jqueryui", "1.5.2"); > </script> > <%= javascript_include_tag 'jrails', 'application', 'thickbox', > 'truncator', :cache=>true %> > > 3. Modify your public\javascripts\application.js file and add the > following at the top: > > // jQuery definition > jQuery.noConflict(); > jq = jQuery; > $ = jQuery; > $$ = jQuery; > > 4. That's it, there's no step 4. > > I'm new to Lovd by Less, and clicking around so far I haven't noticed > any issues with jRails. All of the effects seem to work. Long term it > would be great to re-write the RJS helpers as stand-alone javascipt, > but for now, this solution seems to work. > > - Borishttp://www.borism.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lovd by Less" 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/lovdbyless?hl=en Who loves ya baby? -~----------~----~----~----~------~----~------~--~---
