I\'m using the jQuery Datatables plugin to enable pagination, sorting and searching with my tables. The elements are showing up but not working, and the pagination only sometime
Whilst unrelated to DataTables, I came across this "cannot use in operator to search for length" error. This was the main Google result for the error so just wanted to post my issue as a response in case it helps anyone else.
I had:
ApplicationIDs: $.map(".application-checkbox:checked", function (checkedApplicationCheckbox, i) {
I'd forgotten to wrap my selector with the $
so the fix was to make sure I was passing the actual jQuery elements as the first argument to map
and not just a string...
ApplicationIDs: $.map($(".application-checkbox:checked"), function (checkedApplicationCheckbox, i) {
I'm almost embarrased to post this ;)
Cheers
I'm working on Ruby on Rails with gem jquery-datatables-rails.
I update the gem directly from the last commit on GitHub:
gem 'jquery-datatables-rails', github: "rweng/jquery-datatables-rails", branch: "master"
This work for me, I suppose that that they will release soon a new version of the gem with this commit.