 <p>make sure you load your jquery script first and the dataTables js script later...</p> <p>for sorting</p> <p>Using the aaSorting initialization parameter, you can get the table exactly how you want to present the information.</p> <pre><code> $('#example').dataTable( { "aaSorting": [[ 4, "desc" ]] }); </code></pre> <p>you can go thorugh the <a href="http://datatables.net/release-datatables/examples/basic_init/table_sorting.html" rel="nofollow">documentation here</a></p>