Relevant code snippets are below - What am I doing wrong???
Here's the gem I'm using: https://github.com/stationkeeping/bootstrap-slider-rails
APPLICATION.CSS
* = require_bootstrap-slider
APPLICATION.JS
//
= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
= require underscore
= require gmaps/google
= require bootstrap-slider
INDEX.HTML.ERB
<script>$("#ex8").slider({
tooltip: 'always'
});
</script>
<input id="ex8" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="20" data-slider-step="1" data-slider-value="14"/>
STYLESHEETS DIRECTORY
JS DIRECTORY
THIS IS WHAT I SEE
CONSOLE - ERRORS
Try updating application.js and css to
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//= require underscore
//= require gmaps/google
//= require bootstrap-slider
*= require_bootstrap-slider
My personal preference is to use a CDN
<%= stylesheet_link_tag '//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css' %>
<%= javascript_include_tag '//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js' %>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.