0

I want to let the user input data via a slider. I've found rangeslider.js

How can I include this to my railsproject?

Max
  • 275
  • 1
  • 4
  • 21

1 Answers1

0

I recommend you use bower. You will find a good explanation here.

Then just install the package with the command bower install --save rangeslider.js.

At last, include rangeslider.min.js to your application.js.


A simpler, but hard-to-maintain solution

  1. Move rangeslider.min.js to app/assets/javascripts and rangeslider.css to app/assets/stylesheets.
  2. Add this line //= require "rangeslider.min.js" to application.js.
  3. Test it.

You can also use a cdn: https://cdnjs.com/libraries/rangeslider.js

Good luck!

user1201917
  • 1,360
  • 1
  • 14
  • 27