Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding slider to Rails application

I am having trouble adding a simple slider to my rails 3 application. There don't seem to be any errors in my JavaScript:

My Gemfile has:

gem 'jquery-rails'

group :assets do
  gem 'jquery-ui-rails'
end

skills.js.coffee:

jQuery ->
  $('#slider').slider

skills/show.html.erb:

<div id="slider"></div>

application.js

//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require bootstrap
//= require_tree .

It does not show up in my application. Are there any other steps which I need to take to make it show up?

Thanks

like image 475
GTDev Avatar asked Nov 29 '25 22:11

GTDev


1 Answers

Needed to add jquery ui to css.

Add the following to application.css

*= require jquery.ui.slider

Thanks to simonmorley for solution

like image 185
GTDev Avatar answered Dec 01 '25 14:12

GTDev