KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a 4 column table, I want the first 3 columsn to be sortable by the user, but not the 4th, this is working fine. I also want the 3rd column to sort in ASC order by default. This part isn't working, I cant get any of the columns to sort by default and can't figure out what's wrong with my syntax: $(document).ready(function() { $(".table-sortable").dataTable({ aaSorting: [], bPaginate: false, bFilter: false, bInfo: false, bSortable: true, bRetrieve: true, aoColumnDefs: [ { "aTargets": [ 0 ], "bSortable": true }, { "aTargets": [ 1 ], "bSortable": true }, { "aTargets": [ 2 ], "asSorting": [ "asc" ], "bSortable": true }, { "aTargets": [ 3 ], "bSortable": false } ] }); }); Here's what I've been working from: http://datatables.net/usage/columns
Tags (comma-separated)
Save Edits
Cancel