Test Test
Test Test

Reputation: 2899

jQuery Ui and Rails

I have the jquery (gem 'jquery-rails') gem installed. My application.js file is correct. The UI (date picker) does not show up. I updated the HTML code, (id="datepicker") in my input field, but nothing when I click on it. So i downloaded the jQueryUI from the website with a custom theme, but still nothing. Any help installing the jQuery-UI for rails using a custom theme downloaded??

application.js:

//= require jquery
//= require jquery-ui-1.8.23.custom.min
//= require jquery_ujs
//= require twitter/bootstrap
//= require_tree .

the jQuery custom theme came with a css folder and a jquery 1.80 file (which I dont need because I already have) and the jquery-ui-1.8.23.custom.min file which I put into the vendor/javascript folder. I dont want to use this https://github.com/joliss/jquery-ui-rails because it does not support custom themes. Just tell me where to copy paste files so I can get it done quickly

Thanks

Upvotes: 0

Views: 447

Answers (2)

Deborah
Deborah

Reputation: 4575

I was unable to get jQuery ui working until I precompiled the assets...

RAILS_ENV=production bundle exec rake assets:precompile

This fixed it for me. (I think deleting the contents of public/assets would also have worked.)

Upvotes: 1

MurifoX
MurifoX

Reputation: 15109

It is not enough to just download the plugin, put it into the assets and change the id of your input. You have to code some javascript like this:

$("#datepicker").datepicker();

Upvotes: 2

Related Questions