GTDev
GTDev

Reputation: 5528

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

Upvotes: 3

Views: 4323

Answers (1)

GTDev
GTDev

Reputation: 5528

Needed to add jquery ui to css.

Add the following to application.css

*= require jquery.ui.slider

Thanks to simonmorley for solution

Upvotes: 7

Related Questions