tablesorter

Tablesorter sort; multiple checkboxes, multiple columns

一世执手 提交于 2019-12-01 07:16:27
I've got a tablesorter running almost the way I would like it, there is just one more thing that I don't know how to do. Right now, I have table in which you can search in columns and you can quickly filter the table by pressing a button which puts a value in the search field of a column. The thing is that I would like people to be able to check multiple checkboxes so table will be filtered based on this input. These checkboxes are 'grouped', each group should filter on his corresponding column (eg checking different months should filter the month column). It should be possible to check

TableSorter. Sort by Dropdown selection

大兔子大兔子 提交于 2019-12-01 06:11:55
问题 I have a simple table that contains ID and Name (FirstName + LastName) fields. Above the table I have a dropdown list with Options ID, FirstName , LastName. Based on the selection of dropdown Table should sort. I dont know How to trigger tablesort sort function based the selection. 回答1: Maybe this is what you wanted (demo)? HTML <select> <option value="-">Choose a column</option> <option value="0">column 1c</option> <option value="1">column 2</option> <option value="2">column 3</option>

Jquery dataTables and tablesorter together

♀尐吖头ヾ 提交于 2019-12-01 04:55:05
问题 I had this requirement of paginating the data being shown in the table and fetching it through ajax calls - this I accomplished by using dataTables plugin with the following configuration - bServerSide : true; sAjaxSource : <ajax_source> bPaginate : true, bSort:false, bFilter:false I also had a requirement of sorting this data client side, i.e. only on the current page and not the whole set (See this). For this I tried tablesorter plugin using the following code- "fnServerData": function

jquery tablesorter CSS arrow icons

走远了吗. 提交于 2019-11-30 23:22:08
This is really more of a CSS question than a jQuery question. I'm using the tablesorter jQuery plugin to sort tables dynamically. Here's what it looks like currently: Here's the CSS code that I'm using: th.sortable{ font-weight: bold; cursor:pointer; background-repeat: no-repeat; background-position: center right; } th.headerSortUp { background-image: url("arrow-up.gif"); } th.headerSortDown { background-image: url("arrow-down.gif") } The problem that I have with the current implementation is that the arrow is way over on the right of the header. In the above example, the table is being sorted

How to create a specific sorting function in jQuery Tablesorter?

梦想的初衷 提交于 2019-11-30 22:42:04
I am using this great version of jQuery Tablesorter: http://mottie.github.com/tablesorter/docs/index.html Everything is working well but now I have this problem: in my table, I have one column which contains positions of basketball players. Therefore I want that column to be sorted logically like this: PG-SG-SF-PF-C. I tried to create this custom sorting function - look at my script, column 2: $(document).ready(function() { $(".stats").tablesorter({ sortInitialOrder: 'desc', sortRestart: true, // Enable use of the characterEquivalents reference sortLocaleCompare: false, // if false, upper case

Sort only one column with jquery and tablesorter

*爱你&永不变心* 提交于 2019-11-30 20:51:48
At the moment im using jquery tablesorter and tablesorter filter. My problem is that i want that my filter would filter only one column. Now its filtering all columns. You can see my site here: http://tinyurl.com/3j38vye Now its filtering all colums and i'd like to filter only "Lainasumma" column. Could you also say why its not sorting amounts properly? Did you look at the documentation ? Here is an example of how you would disable some columns that use tablesorter. You can pass a headers object in which you can specify which columns are disabled. An alternate method is to add class="{sorter:

How do I sort a column that contains two divs with jQuery Tablesorter?

穿精又带淫゛_ 提交于 2019-11-30 15:47:37
I'm using jQuery Tablesorter to sort a table. One of my columns looks like this: <td> <div> <span class="green">Yes</span> <a href="##">(unverify)</a> </div> <div class="hidden"> <span class="red">No<>/a> <a href="##">(verify)</a> </div> </td> In other words, there's two divs, one to show Yes in green with a link, and the other to show No in red with a link. One of the divs is always hidden, and the two are toggled whenever the user clicks on the link. jQuery Tablesorter cannot sort on this column. Is there a way to get it to do so, or do I have to modify the HTML to get it to work? You could

How to work with Jquery Table Sorter with knockout

半世苍凉 提交于 2019-11-30 14:21:06
I have a table on which i need to apply sorting. I'm using knockout and jquery.tablesorter.js. I have tried custom binding also but is not helping. Without knockout my code works fine. Below is my table. <table class="tbl" id="dash" data-bind="sortTable: true"> <thead> <tr class="tag close"> <th>Type</th> <th>Title</th> </tr> </thead> <tbody class="scrollContent" data-bind="foreach: Course"> <tr> <td><i class="icon"></i></td> <td><a href="#" id="qtipselector_01" data-bind="text: Title"></a></td> <div id="TooltipContent_01" class="hidden"> <a> Test Tool Tip</a> </div> </div> </tr> </tbody> <

jquery tablesorter plugin - retain alternative row colors

早过忘川 提交于 2019-11-30 11:50:15
I took an html table that I am applying alternative row colors to, and I added jquery table sorter on it so users can sort the table. The issue is that the alternative row colors are all messed up now as (based on the sorting) there are multiple rows with the same background color. Is there any way to reset the alternative row color with jquery table sorter? There's already a default widget zebra , built into the core, which applies the classes odd and even to alternate rows. It works whether or not you have added class=even/odd to the html file. It's really easy to set up. I simply followed

how to get current sort order from tablesorter plugin?

纵然是瞬间 提交于 2019-11-30 08:17:42
问题 I'm just starting to use Christian Bach's excellent TableSorter plugin, and I need to get a column's current sort direction. I have several columns: ID Name Category ID and Name are set to non-sortable using headers: { 0: {sorter: false}, 1: {sorter: false} } I'm adding a click handler on Name so that it fires the sort event on the Category column. Using the example "Sort table using a link outside the table", I'm able to get the Name header to fire the Category sort -- but it's hard-coded to