So I've been through all sorts of questions just like this one from over the years, and I can't figure out what my order should be. My dropdown menus aren't working, and neither is the styling for my data tables. I'm using bootstrap-sass 3.3.7 and bootstrap-will_paginate 1.0.0
Here is my current order in application.js
//= require jquery
//= require parsley
//= require jquery-ui
//= require bootstrap
//= require bootstrap/dropdown
//= require dataTables/jquery.dataTables
//= require_tree .
In applications css I have:
*= require jquery-ui
*= require_self
*= require_tree .
Recently, some important gems deprecated. So I'm in the process of fixing everything to the new standards. So I'm assuming there is something I've missed over the last few years that is messing with me. Also, when I make small changes to application.js, I can't tell if anything is changing. Do I need to run rake clean:assets every time?
Any help would be greatly appreciated.
edit. Updated my order to reflect what is current. Still haven't figured it out.
edit 2. I updated my application.css file to a .scss file, and now it looks like this:
@import "parsley";
@import "jquery-ui";
@import "dataTables/jquery.dataTables";
@import "bootstrap-sprockets";
@import "bootstrap";
@import "/\*";
Same results. None of my Javascript is working, bootstrap appears to be working.
edit 3. I am very close. So my javascript is working, I had to move parsley ahead of jquery, because it requires it.
So what is not working is the code for my table:
jQuery ->
$('#all_participant_table').DataTable({"sPaginationType": bootstrap"});
$('#screening_log').DataTable({
"sScrollX": "100%",
"sScrollXInner": "100%",
"bScrollCollapse": true,
"sPaginationType": "bootstrap"
});
edit 4. Errors resolved. It appears sPaginationType has deprecated, I switched to PagingType and everything worked ("pagingType": "full_numbers")
I hope this post helps someone in the future.