title: JQuery DataTables 1.10.12 issue with JQuery 3.1.0
body: <p>We have upgraded our app to latest Bootstrap (3.3.7) and JQuery (3.1.0) with JQuery DataTables (1.10.12).</p>
  
  <p>Here's the included scripts.</p>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"&gt;       &lt;/script&gt;
  &lt;script src="../js/jquery.dataTables.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;script src="../js/dataTables.bootstrap.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Datatables module code.</p>
  
  <pre><code>var tables = {},
  
  initTable : function(tableID, target, settings){
  
          var searchSettList, map, i, l, paging = settings.paging;
  
          if(paging){
              settings["drawCallback"] = function(settings) {
                  resetPageIndices(settings.oInit);
              };
          }
  
          tables[tableID] = $(target).DataTable(settings);
  
          if(settings.paging)
              setPagingEventListeners(tables[tableID],settings.pagingElements);
  
          if(settings.searching &amp;&amp; settings.hasOwnProperty("searchSettingsInfo")){
  
              searchSettList = settings.searchSettingsInfo;
  
              for(i=0,l=searchSettList.length;i&lt;l;i++){
  
                  map = searchSettList[i];
  
                  if(map.type == "string"){
                      $(map.watchChange).on(map.watchEvent, {index : map.columnIndex, table :tables[tableID]},function(e){
                          e.data.table.columns(e.data.index).search($(this).val()).draw();
                      });
                  }
                  if(map.type == "regex"){
                      $(map.watchChange).on(map.watchEvent, {index : map.columnIndex, table :tables[tableID]},function(e){
                          e.data.table.columns(e.data.index).search($(this).val(),true).draw();
                      });
                  }
                  else if(map.type == "rangeSearch"){
                      $.fn.dataTable.ext.search.push(insertRangeSearch(map.columnIndex,target, map.minEl, map.maxEl));
                      $(map.minEl+","+map.maxEl).on(map.watchEvent,{table :tables[tableID]}, function(e){
                          e.data.table.draw();
                      });
                  }
                  else if(map.type == "searchList"){
                      $.fn.dataTable.ext.search.push(insertListSearch(map.columnIndex,target, map.searchInputTag));
                      $(map.searchInputTag).bind(map.watchEvent,{table :tables[tableID]}, function(e){
                          e.data.table.draw();
                      });
                  }
                  /*else if(map.type == "clearAllSearchFilters"){
                      $(map.watchChange).on(map.watchEvent,{tableID :tableID}, function(e){
                          clearAllSearchFilters(e.data.tableID);
                      });
                  }*/
              }
          }
      },
  
  insertRangeSearch = function(columnIndex, tableTag, fromEl, toEl){
  
      return function( settings, data, dataIndex ) {
  
          if(settings.oInstance.selector != tableTag){
              console.info("wrong table: table is "+settings.oInstance.selector+", but function is for "+tableTag);
              return true;
          }
  
          var min = parseFloat( $(fromEl).val() ),
              max = parseFloat( $(toEl).val() ), 
              val = parseFloat( data[columnIndex] ) || 0;
  
          if ( ( isNaN( min ) &amp;&amp; isNaN( max ) ) ||
               ( isNaN( min ) &amp;&amp; val &lt;= max ) ||
               ( min &lt;= val   &amp;&amp; isNaN( max ) ) ||
               ( min &lt;= val   &amp;&amp; val &lt;= max ) )
          {
              return true;
          }
          return false;
      };
  },
  
  //searches for a string within a list (present in string form)
  //each tag in the column (index of which is passed as argument) must have a list of values separated by a comma 
  //the tag that contains the value to be searched must be passed to the function.
  insertListSearch = function(columnIndex, tableTag, searchInputTag){
  
      return function( settings, data, dataIndex ) {
  
          if(settings.oInstance.selector != tableTag){
              console.info("wrong table: table is "+settings.oInstance.selector+", but function is for "+tableTag);
              return true;
          }
  
          var list = data[columnIndex].split(","),
              searchInput = $(searchInputTag).val();
  
          if(!searchInput)
              return true;
  
          if ( list.indexOf(searchInput) != -1)
              return true;
          return false;
      };
  };
  </code></pre>
  
  <p>Example DataTable Initialization:</p>
  
  <pre><code>sandbox.tables.initTable(_tableID,_tableTag,
          {
              "paging":   true,
              "info":     false,
              "searching": true,
              columnDefs: [
              {
                  targets: "disable_ordering",
                  orderable: false
              },
              {
                  targets: "disable_searching",
                  searchable: false
              },
              {
                  targets: "invisible_col",
                  visible: false
              },
              {
                  targets:   "created_col",
                  orderData: [_createdDateLongCol]
              },
              {
                  targets:   "localtime_col",
                  orderData: [_localDateLongCol]
              },
              {
                  targets:   "due_col",
                  orderData: [_dueDateLongCol]
              },
              {
                  targets:   "taskname_col",
                  orderData: [_taskCommentsCol]
              },
              /*{
                  targets:   "addedby_col",
                  orderData : [_addedByNameCol]
              },*/
              {
                  targets:   "status_col",
                  type :     "string"
              }],
             "dom": 't',
             "order": [[ _dueDateLongCol, "asc" ]],
             "pageLength":10,
             "pagingElements":
              {
                 "previousPageBt":"section#tasks ul.pagination li a.previousPage",
                 "nextPageBt":"section#tasks ul.pagination li a.nextPage",
                 "changePageSelect": "section#tasks select.pagination_rowslist",
                 "startIndex" : "section#tasks .startIndex",
                 "endIndex" : "section#tasks .endIndex",
                 "totalRecords" : "section#tasks .totalRecords",
                 "pagingEventPublish":"tasks-table-paging-event"
              },
             "searchSettingsInfo": 
              [
               {
                  "watchChange" : "section#tasks aside select.filterstatus_list",
                  "watchEvent": "change",
                  "type": "string",
                  "columnIndex":_statusCol
               },
               {
                  "watchChange" : "section#tasks aside select.filtertype_list",
                  "watchEvent": "change",
                  "type": "string",
                  "columnIndex":_typeCol
               },
               {
                      "watchChange" : "section#tasks aside select.filtertimezone_list",
                      "watchEvent": "change",
                      "type": "regex",
                      "columnIndex":_timeZoneCol
               },
               {
                  "minEl" : "#taskListFilterFromDate",
                  "maxEl": "#taskListFilterToDate",
                  "watchEvent": "change",
                  "type" : "rangeSearch",
                  "columnIndex":_dueDateLongCol
               },
               {
                  "searchInputTag" : "section#tasks aside select.filtertag_list",
                  "watchEvent": "change",
                  "type" : "searchList",
                  "columnIndex":_tagsListStringCol
               },
               {
                  "watchChange" : "#clearAllSearchFilters",
                  "watchEvent": "click",
                  "type" : "clearAllSearchFilters"
               }
              ],
              "tableID":_tableID
          });
  </code></pre>
  
  <p>Searching with string and regex works fine.</p>
  
  <p>But rangeSearch - fromdate to todate and list search is not working and giving the following message.</p>
  
  <pre><code>wrong table: table is undefined, but function is for #tasklisting table.
  </code></pre>
  
  <p>If we bring old JQuery below 3.0.0 and old JQuery DataTable 1.10.9...It's working fine.</p>
  
  <p>Please help in this regards. We need our system to use latest libraries.</p>
  
  <p>Thanks in advance :)</p>
  
  <p>Regards,
  Ananthakrishnan.</p>