Nitish
Nitish

Reputation: 57

My table is not getting sorted with Jquery's tablesorter plugin

I have created a simple contact manager using backbone.js and I have stored my data using Jquery saveit and loadit plugins and displayed the data in tables. Now I want to sort the table by first name ,so I used jquery's tablesorter plugin, but it's not working I have read all the documentation of tablesorter but no success. this is what I wrote in render function of view

$("tlist").tablesorter({ 

    // sort on the first column and third column, order asc 
        sortList: [[0,0],[2,0]] 
});

My table looks like this

 first name      last name     phoneno  
--------------------------------------------
 Nitish          pakhare       4545454  
 Ashish          sharma        45454  

Upvotes: 0

Views: 388

Answers (1)

Prasenjit Kumar Nag
Prasenjit Kumar Nag

Reputation: 13461

$("tlist") is not a valid selector make it $(".tlist") if it's a class or $("#tlist") if it's an ID.

Upvotes: 3

Related Questions