tablesorter

Tablesorter: Set initial filter-select value on load

岁酱吖の 提交于 2019-12-07 12:58:17
问题 I have a tablesorter table where a column uses the filter-select and filter-onlyAvail classes. What I'm trying to do is pre-filter that column on one of the values in the drop-down select. I have tried setting it in the data-placeholder attribute but that doesn't do the trick. I've also tried the following: $(document).ready(function(){ $.tablesorter.setFilters($("#table"),['','','','','','','','T'],true); }); It correctly sets the filter in the select menu but doesn't actually RUN the filter

Adding columns dynamically to a table managed with jQuery's tablesorter

我们两清 提交于 2019-12-07 11:19:28
问题 On a web page that has a table that is being sorted by jQuery's tablesorter, there is functionality to add columns to the table dynamically. When this happens I call trigger("update") and trigger("appendCache") to get tablesorter to be able to sort by the new column (I have also tried calling tablesorter() again). However, the widgets for sorting do not appear in the new column(s) until I click in the header cells. My question is does anybody know how to get the widgets to appear immediately?

Jquery: TableSorter- Date with specic format is not working

╄→尐↘猪︶ㄣ 提交于 2019-12-07 10:27:45
问题 I am using Tablesorter plugin to sort the table . fourth column is date fields having format : --> 30 Jan 2013 --> 01 Feb 2013 when i try to sort format it gives wrong sorting. My View page:(one of the date column ) <td onclick="viewTrainingeDetails(${privateTrainingInstance?.id})"><g:formatDate format="dd MMM yyyy" date="${privateTrainingInstance?.startDate}" /></td> jquery $(function() { $("#myTable").tablesorter(); }); 回答1: Try adding this custom parser (demo): $.tablesorter.addParser({ id

jquery tablesorter + ajax div content update problem

痴心易碎 提交于 2019-12-07 06:20:16
问题 I'm having trouble with my tablesorter and ajax div content update. Once the ajax is reloaded all the tablesorter functionalities are lost. I've tried livequery but it doesn't seem to work beyond first listing of the table. <script type="text/javascript"> $(document).ready(function(){ $(".tabs > ul").tabs(); $("#sortabletable").tablesorter({ headers: { 4: { sorter: false }, 5: { sorter: false } }, widgets:['zebra'], sortlist:[[0]] }); }); $("#sortabletable").livequery(function(){ $(this)

How to have multiple jQuery TableSorter tables on a page

感情迁移 提交于 2019-12-07 04:18:45
问题 The plugin is working fine when I only have 1 table on a page. But with two, I get an error: Uncaught TypeError: Cannot set property 'count' of undefined That's because of the sortList option set below. I have it set to sort on the 4th column, and the aux_table , displayed first, only has 3 columns. But it works and the main_table doesn't. How do I get them both to work, or just the second, more important main_table ? Both tables are class tablesorter and they have different ids ( main_table

TypeError: 'undefined' is not a function with Tablesorter only in Safari

让人想犯罪 __ 提交于 2019-12-07 02:54:18
问题 Only in safari I get the error: TypeError: undefined is not a function (evaluating '$("table").tablesorter') In all other browsers it works. This is my javascript code, and I have putt in the header the scripts to jquery and the tablesorter javascript. So how can i solve this problem? And why is it only in Safari and not in any other browser? <script> $(function() { // call the tablesorter plugin $("table").tablesorter({ theme : 'jui', headerTemplate : '{content}{icon}', // hidden filter

Can't get Tablesorter Checkbox Filtering to work

女生的网名这么多〃 提交于 2019-12-07 02:23:27
I'm trying to get a tablesorter filter plugin to work with checkboxes. The default they show is a string textbox sort: filterContainer (string) - The DOM id of the input box where the user will type the search string. The default is "#filter-box". .tablesorterFilter({filterContainer: "#filter-box", filterClearContainer: "#filter-clear-button", filterColumns: [0]}); . <input name="filter" id="filter-box" value="" maxlength="30" size="30" type="text"> And I'm trying to do a checkbox filter, and this is what they say about checkboxes: filterOrMode (boolean) - Filter by OR mode, any word may occur

JQuery tablesorter: Modify how it sorts empty cells

六月ゝ 毕业季﹏ 提交于 2019-12-07 00:59:10
问题 I have a big table and want to sort using tablesorter. The problem I'm dealing with is that tablesorter act as 0 for empty cells when sorting with numbers. How can I push the empty cells to bottom? As an example, tablesorter sorts like that -5 -4 -1 <empty cell> <empty cell> 6 7 15 23 I want to sort as -5 -4 -1 6 7 15 23 <empty cell> <empty cell> 回答1: You can specify your own text extraction function: $(table).tablesorter({ textExtraction: function (node) { if (node.innerHTML.length == 0) {

Table sorting in twitter bootstrap 3.1.1 [closed]

时间秒杀一切 提交于 2019-12-06 20:30:40
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . <div class="table-responsive"> <table class="table table-hover gradienttable"> <thead> <tr> <th>Id</th> <th>State</th> <th>Sub State</th> <th>Title</th> <th>Severity</th> <th>InstanceNum</th> <th>CreatedBy</th> </tr> </thead> <tbody> @foreach (var incident in Model

Extracting filtered table data

怎甘沉沦 提交于 2019-12-06 16:27:55
问题 I was wondering if it is possible to extract the filtered data from a table which has been filtered using the JQuery tableSorter plugin/widget. I have a large table shown, and I then filter/sort it using the normal tablesorter functionality - but what I would like to do is be able to take this smaller table and export some data from it it's a list of members - so I want to be able to export data (eg email addresses) from the filtered (eg all over a certain age) data so I can then send emails