Ruby on Rails 3.1 and jQuery UI images

前端 未结 18 983
无人及你
无人及你 2020-12-12 11:50

I\'m using Ruby on Rails (Edge, the development version), and Ruby rvm 1.9.2.

application.js is as follows.

//= require jquery
//= requi         


        
18条回答
  •  离开以前
    2020-12-12 12:20

    Example of a working setup:

        $ cat app/assets/javascripts/application.js
    
        //= require jquery
        //= require jquery-ui
    
    
        $ cat app/assets/stylesheets/application.css
    
        /*
         *= require vendor
         *
         */
    
    
        $ cat vendor/assets/stylesheets/vendor.css
    
        /*
         *= require_tree ./jquery_ui 
         *
         */
    
        vendor/assets/ $ tree
         stylesheets
             vendor.css
                 jquery_ui
                          jquery-ui-1.8.13.custom.css
                          ...
         images
            jquery_ui
                ui-bg_flat_0_aaaaaa_40x100.png
                ...
    

    Finally run this command:

        vendor/assets/images $ ln -s jquery_ui/ images
    

    Enjoy your jQuery UI

提交回复
热议问题