I have added //=require jquery-ui
to my application.js file and that seems to give me the javascript but I can\'t seem to get the stylesheets to be included. If
quote from the jquery-rails manual:
In order to use the themed parts of jQuery UI, you will also need to supply your own theme CSS. See jqueryui.com for more information.
So, you have to include or style them yourself! Just include the theme's .css
in the header of your page. In Rails 3 you'd put the css in public/stylesheets
, don't know for Rails 3.1.
If you have jquery-rails on Gemfile, just do:
//= require jquery-ui
or
//= require jquery-ui.min
both will work fine. If not, try to update jquery-rails gem
Don't forget the css files, here I followed some articles on that other answer: Ruby on Rails 3.1 and jQuery UI images and got it working by this way:
*= require jquery-ui/jquery-ui.css
this is the path for files:
vendor/assets/stylesheets/jquery-ui/jquery-ui.css
vendor/assets/images/jquery-ui/images/ (your theme images)