Struggling with integrating Bootstrap Switch into my project that already uses Bootstrap and jQuery. It seems like the JavaScript isn't affecting the HTML, which is driving me crazy.
I've tried adding Bootstrap Switch using both the gem and straight js/css methods. I attempted to use sass and css from the gem as well. However, no matter what I do, it appears that the JavaScript isn't functioning properly. Even though the bootstrap-switch js file is included, the functionality doesn't work as expected.
Here are some snippets of my setup:
Gems
Using sass (3.3.2)
Using bootstrap-sass (3.1.1.0)
Using bootstrap-switch-rails (2.0.2)
Using jquery-rails (3.1.0)
Using sass-rails (4.0.1)
Application.css.scss
@import "bootstrap";
@import "bootstrap3-switch";
Application.js
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require bootstrap-switch
//
//= require_tree .
other.js
$("#famous-people-switch").bootstrapSwitch();
some.html.erb
<div class="col-md-6">
<input id="famous-people-switch" type="checkbox" name="famous-people" checked>
<h4>Famous People:</h4>
</div>