aTargets not interpreted
aTargets not interpreted
curt
Posts: 2Questions: 0Answers: 0
In my datatable, I have my two last columns, that contain action icons. Those 2 columns (with class "d_th_nosort") don't need to be sortable.
I use the following code :
$(document).ready(function() {
var oTable = $('#distribtable').dataTable( {
"aaSorting": [[ 6, "desc" ],[ 1, "desc" ]],
"aoColumnDefs": [
{ "bSortable": false, "aTargets":["d_th_nosort"] }
]
} );
} );
without the aoColumnDefs definition, the DataTables work fine, but when I use this, I get an error "$.isArray is not a function" in jquery.dataTables.js at line 7176.
This line is :
if ( !$.isArray( aTargets ) )
Based on the documentation, I guess I must have done something wrong.
Can anybody please guide me on this issue?
I use the following code :
$(document).ready(function() {
var oTable = $('#distribtable').dataTable( {
"aaSorting": [[ 6, "desc" ],[ 1, "desc" ]],
"aoColumnDefs": [
{ "bSortable": false, "aTargets":["d_th_nosort"] }
]
} );
} );
without the aoColumnDefs definition, the DataTables work fine, but when I use this, I get an error "$.isArray is not a function" in jquery.dataTables.js at line 7176.
This line is :
if ( !$.isArray( aTargets ) )
Based on the documentation, I guess I must have done something wrong.
Can anybody please guide me on this issue?
This discussion has been closed.
Replies
[quote]curt said: "$.isArray is not a function"[/quote]
That suggests that $ is either not jQuery (which is should be in DataTables since it is wrapped up in a closure!) or that you are using jQuery <1.2 ( http://api.jquery.com/jQuery.inArray/ ).
Can you give us a link to your page please - that would really help to understand what is going on.
Thanks,
Allan
I saw that i was using jQuery 1.2.6
Now that i have installed 1.5.2, it all falls back in place!
Thanks again for the effort.