jquery - Bootstrap Slider + Rails: Multiple sliders are loaded on page load -


i using bootstrap-slider gem in rails 4 wizard , reason, when navigate wizard step slider, shows correct number of sliders, once nivagivate next step, , go step sliders, twice many loaded.

view:

<div class="form-group col-sm-6">     <%= f.input :weightloss_desire, input_html: { data:          {provide: "slider",             "slider-max": 10,             "slider-min": 0,             "slider-step": 1,             "slider-tooltip": "hide",             "slider-ticks": [1,10],             "slider-ticks_positions": [0, 100],             "slider-ticks_labels": ["minimal", "strong!"],             "slider-tooltip": "hide",              "slider-value": @remote.weightloss_desire}         }, label_html: {class:"block"}, label: "weight loss desire"  %> </div> <div class="form-group col-sm-6">     <%= f.input :daily_stress, input_html: { data:          {provide: "slider",             "slider-max": 10,             "slider-min": 0,             "slider-step": 1,             "slider-tooltip": "hide",             "slider-ticks": [1,10],             "slider-ticks_positions": [0, 100],             "slider-ticks_labels": ["minimal", "strong!"],             "slider-tooltip": "hide",              "slider-value": @remote.daily_stress}         }, label_html: {class:"block"}, label: "daily stress level"  %> </div> 

once refresh page, view reverts , shows 2 sliders. also, i'm not sure if relevant, keep seeing warning

bootstrap-slider.min.js:4 bootstrap-slider.js - warning: $.fn.slider namespace bound. use $.fn.bootstrapslider namespace instead.

but since calling slider inline, i'm not sure how correct that

same problem. fixed removing turbolinks.

remove

gem "turbolinks"

from gemfile , run bundle

remove

//= require turbolinks

from application.js


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -