Menu
  • HOME
  • TAGS

Table sorting for DD-MM-YYY hh:mm:ss not working

jquery,datetime,tablesorter

You can do it with a addParser as code given below, This is simply convert time to numeric value and sort. $.tablesorter.addParser({ id: 'date_column', // ID of the date column is: function(s) { return false; }, format: function(s) { // convert datetime to timestamp var dateParts = s.match(/(\d+)-(\d+)-(\d+) (\d+):(\d+)/); date...

tablesorter filter plugin throws error "Cannot Read property '$table' of undefined

jquery,tablesorter

Had this exact problem today, resolved it simply by updating my tablesorter file to the latest version from their website and updating jquery too.

JQuery tablesorter math widget with output widget

jquery,widget,tablesorter

It looks like the output widget wasn't including the tfoot rows, so I added a new option output_includeFooter. This code change is currently available in the master branch of the repository. Download the file: widget-output.js (click on the raw button). Or, download a zip of the entire repository (link on...

Search result of a table on jsfiddle

search,tablesorter,jsfiddle

I'm not sure why you'd want to do this since it is the opposite of what users expect, but all you need is this extra bit of code (demo): $('table').on('filterEnd', function(){ if ( this.config.lastSearch.join('') === '') { $(this).children('tbody').children().addClass('filtered'); } }); ...

jQuery tablesorter sorting formatted currency

javascript,django,sorting,tablesorter

The solution to my problem was to do the formatting on the server. May this be a lesson to not put hacky crap in my markup. For the record, in my Django view, I did this: customer_stats[c['customer']]['processing_fee'] = '${:,.2f}'.format(float(c['processing_fee'])) Then I removed the custom parser and used this: tablezor.tablesorter({ sortList:...

jQuery Tablesorter File Size in Rails App

javascript,jquery,ruby-on-rails,haml,tablesorter

To make file sizes sort properly, you'll need a parser to convert "GB" and "TB", etc, into sortable numbers. There is a metric parser available on my fork of tablesorter - demo which converts both metric & binary values to make sorting work. To use it, load the parser file,...

tablesorter select box with a custom match function

html,tablesorter

Use the filter_functions widget option as follows (demo): $(function () { $('table').tablesorter({ theme: 'blue', widgets: ['filter'], widgetOptions: { filter_functions: { 1: { "Programmer": function (e, n) { return /programmer/.test(n); }, "Professor" : function (e, n) { return /professor/.test(n); }, "Builder" : function (e, n) { return /builder/.test(n); } } }...

How to update tablesorter onclick in dynamic table?

javascript,jquery,html,tablesorter

Ignore my comment is trigger("update") the function you need, but check if this code works $(document).ready(function(){ $("table").tablesorter({ sortList: [[0,1]] }); $("table").click(function(){ $("table").trigger("update"); }); }); EDIT If you are using get to obtain csv data you need something like this: $.get("your/csv/file.csv",function(csv){ //... code that handle your csv and put into table...

Tablesorter sortList Malfunction?

javascript,tablesorter

Using [[4,1]] will sort the 5th column (it uses a zero-base index). Instead try this code (demo): $(function(){ $("#myTable").tablesorter({ sortList : [[1,1],[2,1]], // initial sort columns (2nd and 3rd) cssInfoBlock : "tablesorter-no-sort" }); }); ...

Issues using simplePagination jQuery plugin with tablesorter widget

jquery,tablesorter

If you want to use simplePagination, you'll need to use it along side the pager plugin or widget. Here is a demo using the pager widget: $(function () { var perPage = 10, $table = $('table'); $table.tablesorter({ widgets: ['zebra', 'filter', 'pager'], widgetOptions: { filter_columnFilters: false, pager_size: perPage }, initialized: function...

Grails: Trying to use tablesorter

jquery,grails,tablesorter

I was able to locate some information on using the tablesorter that might be helpful. if you add this to your page header you should get the functionality of tablesort with widgets and themes. <!-- ui theme stylesheet - contents shown below --> <link rel="stylesheet" href="../css/theme.jui.css"> <!-- jQuery UI theme...

Tablesorter jQuery ZebraStrip not working

javascript,jquery,html,css,tablesorter

This will do it: HTML <!-- your table code --> <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> <script src="LINKTOPLUGIN.js"> <script> $(document).ready(function () { $("#myTable").tablesorter(); }); </script> CSS table.tablesorter { font-family:arial; background-color: #CDCDCD; margin:10px 0pt 15px; font-size: 12px; width: 100%; text-align:left; } table.tablesorter thead tr th { background-color: #E6EEEE; border: 1px solid #CCC; font-size: 10px; padding:...

Tablesorter stickyheaders inside jQuery UI tabs

tablesorter

It looks like the issue is that the #mywrapper element is missing a position:relative; definition. The sticky header is using position:absolute, so it ends up getting its positioned calculated based on the #tabs element, which is the only parent element with a position:relative assigned (by the jQuery tabs widget) (updated...

yii table sorter customize ajaxurl

php,ajax,yii,tablesorter

Sory if it's too technically,, it's solved with change & to ? code : ajaxUrl : '<?php echo Yii::app()->createUrl("Dasboard/DataAds");?>?page={page}&size={size}&{sortList:col}&{filterList:fcol} ',//{filterList:filter}&{sortList:column}', ...

Table sorter initial page size doesn't work

jquery,tablesorter

It appears that you are using the original version of tablesorter (v2.0.5, from tablesorter.com) along with jQuery v1.11.2. The problem is that the jQuery $.browser function was completely removed in jQuery v1.9+, so that code won't work because there is a javascript error preventing the pager plugin from initializing completely....

jQuery tablesorter - IE8 issue with adding style to table row

javascript,jquery,css,internet-explorer-8,tablesorter

Can add td to rule .tablesorter tbody tr:nth-child(odd) td{ background-color: #faf4e2; } Or .tablesorter tbody tr:nth-child(odd), .tablesorter tbody tr:nth-child(odd) td{ background-color: #faf4e2; } Or Add an IE conditional comment around a style tag that adds the td rule so it only takes effect in IE < 9...

Tablesorter Filter drop-down with icons

jquery,tablesorter

Normal select dropdowns do no allow HTML; this is what is created for when a "filter-select" class is added to the header. You can use select2's templating to add icons to a custom dropdown and the tablesorter filter_formatter option with the select2 filter formatter code (demo) to create the dropdown...

Jquery Tablesorter lost StickyHeaders widget

jquery,ajax,tablesorter

So solved it like this $('#sortTable').resize(); ...

How to prevent jQuery Tablesorter randomly sorting empty cells?

jquery,tablesorter

Try out my fork of tablesorter. It has options to specifically sort spaces and text within a numeric column: emptyTo option (demo) String indicating how tablesorter should deal with empty table cells. "bottom" - sort empty table cells to the bottom. "top" - sort empty table cells to the top....

tablesorter update widgetOptions for columnSelector

widget,config,tablesorter

* Please note * this widget & code only work on my fork of tablesorter. You could target all (or both in this case) tables, then use the jQuery .each() method like this: $(".tablesorter") .each(function(i, table){ var $table = $(table); $table.tablesorter({ // ... widgetOptions: { // ... columnSelector_container : $('#columnSelector'...

Table sorter pager not working on survey view

javascript,html,tablesorter

It looks like tablesorter is being mix-and-matched from the original tablesorter and the forked version of tablesorter - they are not compatible with each other! Since you are using a Bootstrap theme, it might be better to use the forked version. Instead of pointing to files from the respective sites,...

Tablesorter in dynamic JQuery UI doesn't work

javascript,jquery,jquery-ui,tablesorter,dynamic-content

Tablesorter will need to be initialized after the dialog window becomes visible (demo): HTML <button id="opener">Open Dialog</button> <div id="dialog" title="Basic dialog"> <table class="tablesorter"> <thead> ... </thead> <tbody> ... </tbody> </table> </div> Script $(function () { $("#opener").click(function () { $("#dialog").dialog("open"); }); $("#dialog").dialog({ autoOpen: false, open: function (event, ui) { $('.ui-dialog table').tablesorter({...

Reset an elements 'odd' or 'even' status?

javascript,jquery,dom,tablesorter

If the striping is only for styling, you can sidestep this whole problem just using CSS. Example: tr:nth-child(2n) { background: gray; } tr:nth-child(2n+1) { background: lightgray; } If you really need some function to run after sorting takes place, a quick glance at the documentation suggests that you might do...

Jquery, php, mysql table sorting using tablesorter

php,jquery,mysql,tablesorter

You need to add the pound sign # to "products" for: $("products").tablesorter(); in regards/reference to the table's "id" <table border='1' id='products' class='tablesorter'> change that to: $("#products").tablesorter(); ...

Sortable Jquery table not working in new Jquery version

jquery,jquery-ui,tablesorter,jquery-ui-sortable

You are using onl jquery.ui.min.js file if you upgrade jquery.min.js you also have to upgrade jquery.ui.js file try to replace you file with this:- <script src="http://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script> and here is :-Demo...

In Tablesorter, setting different values to the dropdown options of a column filter

javascript,jquery,tablesorter

What exactly are you trying to do with the filter select? You can change the select options using the filter_selectSource option (demo) $(function () { $('table').tablesorter({ theme: 'blue', widgets: ['zebra', 'filter'], widgetOptions: { filter_selectSource: { 1 : [ 'Client', 'Collaborator' ] } } }); }); ...

tablesorter column with text and integer

javascript,jquery,website,integer,tablesorter

What's happening is that the 86 is the very first cell in the column. So the auto-detection of parsers thinks that is a numeric column. To fix it just set the column parser to text. The easiest way to do it is to add a "sorter-text" class to the header....

tablesorter with pager - force update when table is empty

jquery,tablesorter,pager,jquery-pagination

Instead of clearing the table and triggering an update, there is a different method to use to force the pager to update: In the current version (2.18.4), the easiest way to do this is to clear an internal stored variable, then trigger a page change: $('table')[0].config.pager.last.ajaxUrl = ''; $('table').trigger('pageSet'); I...

jquery tablesorter : determining sort order for column

jquery,tablesorter

For the following code to work, you'll need to use my fork of tablesorter which has css, widgets and addons that are not compatible with the original version. This is somewhat similar to this Stackoverflow question except that it allows sorting one column using two different values (both answers work...

Tablesorter editable, howto enable edit for a newly added row

jquery,ajax,tablesorter

The solution for me was to define the editable columns as an array instead of text: editable_columns: [0, 1, 2, 3, 4]

jQuery.tablesorter with Lazy Load

javascript,jquery,lazy-loading,tablesorter

Sorting table will generate new position for images, so you could execute lazy load after sorting end. Try this: $(document).ready(function(){ $("#table").tablesorter(); $("#table").bind("sortEnd",function(e, table) { $("img.lazy").lazyload({ effect : "fadeIn" }); }); }); ...

how can i store a sort using jquery tablesorter?

jquery,sorting,tablesorter

I can't tell if you are using the origin tablesorter (v2.0.5) or my fork of tablesorter. Either way, you need to set the sortList option apply an initial sort to a table $(function(){ $("table").tablesorter({ sortList : [[1,0], [2,1]] // initial sort columns (2nd and 3rd) }); }); The sortList uses...

Jquery tablesort

jquery,tablesorter

The issue in within the parser code... the text is set to lower case, but the regex contains upper case characters. Try this updated parser: var arry = [ 'new', 'in progress', 'cancelled', 'finished', 'deleted' ]; $.tablesorter.addParser({ id: 'status', is: function() { // return false so this parser is not...

Plugin not loading

jquery,tablesorter

jQuery was being loaded twice in that codepen... (updated demo) In the <head> jquery v2.1.4 is being loaded, and at the bottom of the document, next to where Bootstrap scripts are loaded, jQuery v1.11.2 is loaded. When jQuery is loaded twice, any scripts that are loaded between to the two...

Tablesorter StickyHeaders shifts columns over on scroll

javascript,css,tablesorter

Here, the issue was the CSS: * {box-sizing: border-box;} However, when applied to the demo, I could not reproduce the error. I've tried to determine what else in conjunction would be causing the issue, but whatever I tried, it would always resolve back solely to border-box. I answer my own...

Disable ascending/descending order in jquery tablesorter only for initial page load

c#,jquery,asp.net,tablesorter

If you only need pagination, then you really don't need to use tablesorter. I'm sure asp.net provides a method to add it. In any case, since you appear to be using the original tablesorter, you could disable every column to prevent sorting as @oMiKey suggests. If you use my fork...

jquery tablesorter plus javascrip/jquery offset conflict

javascript,jquery,scroll,tablesorter

First off, the anchors need to be changed. I prefer to use id instead of name; also ref is not a valid attribute (demo) <a id="home"></a> ... <a href="#tag1">Goto Tag 1</a> <br/> <a href="#tag2">Goto Tag 2</a> ... <a id="tag1"></a>TAG 1 <a href="#home">Go to top</a> ... <a id="tag2"></a>TAG 2 <a href="#home">Go...

jQuery Tablesorter and dynamic tables

c#,jquery,asp.net-mvc-4,tablesorter,jsrender

Adding $(function () { $('#ItemsGrid').tablesorter({ widgets: ['zebra', 'columns'], usNumberFormat: false, sortReset: true, sortRestart: true }); }); To the end of displayItemsGrid() did the trick....

TableSorter : Filter digits with comma as decimal sign

tablesorter

Just set the usNumberFormat option to false (demo)

Jquery tablesorter addParser two headers rows sorter-false

jquery,tablesorter

I don't think that would work on the original version of tablesorter. It will ignore the second header row. But, if you are using my fork of tablesorter, you can set it up as follows (demo): HTML <table class="tablesorter"> <thead> <tr> <th class="sorter-false">AlphaNumeric</th> <th class="sorter-false">Numeric</th> <th class="sorter-false">Animals</th> <th class="sorter-false">Sites</th> </tr>...

tablesort multiselect dropdown

javascript,jquery,tablesorter

You can use the filter_formatter option along with the extra filter-formatter select2 code to use the select2 plugin. Here is a demo. filter_formatter : { // default settings on first column 0 : function($cell, indx){ return $.tablesorter.filterFormatter.select2( $cell, indx, { // *** select2 filter formatter options *** cellText : '',...

Tablesorter Editable Widget change how to select a row

tablesorter

Content Editable is a browser rendering, and as such TableSorter has little control on how it functions. That being said you could write your own. Don't use the ContentEditable widget at all, just bind each tbody td to a double-click event, then wrap the content in a content editable div...

JQuery plugin gives error

javascript,php,jquery,html5,tablesorter

http://jsfiddle.net/LFBmL/2/ I have created fiddle for you.please look into it. The JavaScript code must be like this <script type="text/javascript"> $(document).ready(function() { $("#myTable").tablesorter(); $('#myTable').tableScroll({height:300}); } ); </script> Note: "$('#showconnections')" which element has id"showconnections" ,if you meant your table then it must be "myTable" Both your plugins "TableScroll" & "Table Sorted" combined...

jQuery TableSorter Plugin(Uncaught TypeError: Cannot read property 'msie' of undefined)

jquery,pagination,tablesorter

As i am seeing, you are using 2.0 jquery version, and probably tablesorter plugin working with old jquery version.. Error is occuring because $.browser.mise function has deprecated in jQuery 2.0 version, so you should use older jQuery version <= 1.3. Or use compatible sorter plunin....

Tablesorter always reloads first page after content-edit

javascript,contenteditable,tablesorter

So the problem turned out to be an issue with the pager addon/widget. When a cell is edited, an "updateCell" event is triggered by the editable widget to update the internal cache. Once this process completes, an "updateComplete" event is triggered by the core plugin. In the pager code, when...

What is the “official” tablesorter repository?

github,tablesorter

As I mentioned in the issue that was opened: Christian Bach added his GitHub repository on May 20, 2014, whereas my fork was created somewhere around June 2011. So there really isn't a way for me to fork from his repo now. Nothing is missing, except for a few documented...

tableSorter custom date parser doesn't work

javascript,sorting,view,tablesorter

Actually no custom date parser is needed. The dateFormat option should be set to ddmmyyyy. The only settings available for that option are: mmddyyyy ddmmyyyy yyyymmdd Once set, the time will be included in the parsing of the date (demo)....

Jquery table get total

jquery,tablesorter

Try changing line: dataRows = element.find('tbody tr'), to dataRows = element.find('tbody tr:visible'), which applies the :visible selector...

“Sticky rows” for jquery tablesorter

javascript,jquery,tablesorter

It sounds like you're asking about child rows (demo). To make this work in tablesorter, just add the class name "tablesorter-childRow" to any row that will be attached to the row above it. <tr> <td>cell1.1</td> <td>cell1.2</td> <td>cell1.3</td> </tr> <tr class="tablesorter-childRow"> <td>cell1.4</td> <td collspan="2">cell1.5</td> </tr> ...

The column sort in my tablesorter is overriding the checkall check box in my table header

javascript,jquery,checkbox,tablesorter

I think all that is missing is to stop propagation of the click: $('.checkall').on('click', function (e) { e.stopPropagation(); $(this).closest('fieldset').find(':checkbox').prop('checked', this.checked); }); ...

Need help in implementing tablesorter 2.17.1(or latest)

asp.net-mvc-4,tablesorter

You'll need to add an element on the page that allows the user to click to reset the sort. In this example, I'll use a button: <button type="button" class="reset">Reset Sort</button> then apply the appropriate script to give that button the ability to trigger the reset event: $(function () { $('.tablesorter').tablesorter({...

How to filter jQuery Tablesorter by multiple columns using OR logic

javascript,jquery,filter,tablesorter

If I am understanding the request, maybe try something like this (demo): $(function () { var $table = $('table'), // get 'filter-OR' column indexes orColumns = $('.filter-OR').map(function (i) { return this.cellIndex; }).get(), filterfxn = function (e, n, f, i, $r, c) { var col, v, showRow = false, content =...

how to get rid of the “tablesorter-header-inner” div in tablesorter 2

jquery,tablesorter

It sounds like you're using my fork of tablesorter. If that is the case, just set the headerTemplate option to an empty string ('') (demo): $(function () { $('table').tablesorter({ theme: 'blue', headerTemplate: '' }); }); The reason it was added was because in older versions of Firefox, the table cell...

Tablesorter - emptyTo not working

javascript,coffeescript,tablesorter

The config is correct, it has some redundant settings (i.e. are default anyway), but better be safe than sorry. The comment on line 2 is not valid CoffeeScript syntax, but that's for purposes of posing on Stack Overflow. Since you've mentioned the table is generated using javascript (or CoffeeScript, it...

Table Sorter download as csv

javascript,jquery,tablesorter

you are assigning $wo = $("#table1").config.widgetOptions; and then using wo for further methods. You should use either wo or $wo. I added these js files in my code and its working now: <script src="http://mottie.github.io/tablesorter/js/jquery.tablesorter.js"></script> <script src="http://mottie.github.io/tablesorter/js/widgets/widget-output.js"></script> <script src="http://mottie.github.io/tablesorter/js/jquery.tablesorter.widgets.js"></script> Remove any other tablesorter js and add the above ones. ...

Change position of tablesorter icon at runtime

jquery-ui,twitter-bootstrap-3,tablesorter

You just need your custom css to override (have higher specificity) the bootstrap theme definitions. Since no HTML was provided, this demo right aligns all the tbody content of the "English" column and left aligns the icon, of the cell in the thead. tr td:nth-child(4) { text-align: right; } .tablesorter-bootstrap...

tablesorter and select / dropdown boxes

jquery,tablesorter

There is a parser that comes with the plugin in the /js/parsers/ directory named parser-input-select (ref) which contains code to both parse (the textExtraction change is not required) and update the internal cache when a user changes the select. To ensure the select parser is being used, load this parser...

Best practices of exporting records from HTML table

javascript,jquery,html,tablesorter

The output widget has a output_savedRows option which has the following settings: "filtered" which outputs rows that match the filter query. It does this by using the following selector: $('tr').not('.filtered') a class added by the filter_filteredRow option "visible" which only outputs visible rows. Rows hidden by the pager, filter or...

jQuery Tablesorter From and To range not working - Cannot call method 'uiDatePicker'

jquery,tablesorter

I thought your question was about using the filterFormatter which modifies the inputs within the table, but since your date inputs are outside of the table, you'll need to use code that looks something like this (demo): var $table = $('#alerts'), validDate = function (d) { return d instanceof Date...

Using jQuery tablesorter with javascript table array

javascript,jquery,html,arrays,tablesorter

Your issue is you are initializing the plugin before the table is built. Switch the order of execution. To do this only use one load handler to be assured you know the sequencing $( document ).ready( function() { pageload(); // table is build, call plugin $( "table" ).tablesorter(); }); ...

jQuery tablesorter parser for datetime in DD.MM.YYYY HH:MI in 24hour format

jquery,parsing,datetime,tablesorter

Sort UK/European date format dd/mm/yyyy hh:mm(works both with and without hour) by defining dateformat:"uk" like so: $("#tableName").tablesorter({dateFormat: "uk"}); ...

TableSorter - when creating new child rows, it is ignored by the sorter

jquery,html,tablesorter

When a new row is added, the tablesorter internal cache also needs to be updated. In order to do this, you'll need to trigger the "update" method (demo) function childRow(source, target) { var childRowId = '#' + target; // ... code to add rows $('table').trigger('update'); } ...

Sort HTML Table, that gets appended via JQuery

javascript,jquery,tablesorter

You need to tell table sorter that you've changed the data and that you want to sort it by triggering events. Example from the docs: http://tablesorter.com/docs/example-ajax.html $("table").tablesorter(); $("#ajax-append").click(function() { $.get("assets/ajax-content.html", function(html) { // append the "ajax'd" data to the table body $("table tbody").append(html); // let the plugin know that we...

Sorting columns issue using tablesorter.com lib

jquery,tablesorter,plunker

The version of tablesorter you are using is v2.0.1, so it's not even the latest version from tablesorter.com. Also, thank you for enabling the debug code. It appears that "Col 7" (column 6 in the debug) is being set to use the "integer" parser, so when you sort it is...

Keep rows with certain values always at the bottom while sorting in jquery tablesorter plugin

javascript,css,tablesorter

I'm glad that I fixed this issue by myself and I'm happy to share this to folks who might need this in future. There are two things to this issue Tell table sorter to consider the N/A as empty. this can be done using the textExtraction(method used to extract values...

Tablesorter: sorting the Czech alphabet

javascript,jquery,tablesorter,non-english

It is working. The "z" has been replaced in the internal cache. Although you might need to include a true flag to perform a deep extend: $.extend( true, $.tablesorter.characterEquivalents, { ... }); Check out this demo (sort to see the column values in the firebug window): http://jsfiddle.net/Gk43v/19/ Update: Ok, the...

Wrong column filtering for date column

javascript,sorting,formatting,filtering,tablesorter

You are seeing two things happen here: When entering a number in the filter that is not a valid date, a string comparison is done. So that is why the first row matches. Because the filter_defaultFilter for column 1 is set to use a fuzzy search filter_defaultFilter: {1: '~{query}'} a...

“e.handler.apply” is not a function in jquery table sorter

jquery,tablesorter

You are missing a function() callback block of click: $("#sortHeader").click(function(){ // <-----you need to have a callback function. $(".tablesorter").bind("sortStart",function(e, table){ $('.tablesorter').trigger('pageSet',0); }); }); // <---do a proper closing. Issue in your code: When you do : $("#sortHeader").click( without a callback function that will always gives you error in the jQuery...

jQuery Tablesorter change values or style of a row

javascript,jquery,tablesorter

Yes you can: function changeValues(index_row) { //SELECT TR BY INDEX $TR = $("#TABLE_ID > tbody > tr").eq(index_row); //EDIT YOUR TD's $TR.find("td:eq(0)").html(VALUE); $TR.find("td:eq(1)").html(SECOND_VALUE); //... } ...

jQuery Tablesorter with jQuery 2.x

jquery,tablesorter

If you look at the development console (press F12), you'll see there is a javascript error - try it in this demo Uncaught TypeError: Cannot read property 'msie' of undefined This error is only seen when using jQuery v1.9+. This is because the pager code uses the plugin's internal clearTableBody...

Sorting versioning info in tablesorter.js

jquery,html,tablesorter,versioninfo

Try this generic version parser (demo): $(function () { /************************ Generic version parser ************************/ // set the number of blocks // e.g. 2 = 000.000 // and 3 = 000.000.000 var blocks = 3, // length of each block // 3 = 000 // 4 = 0000 digits = 3;...

Tablesorter initial sort with custom parser, and all columns with sorter turned off

jquery,parsing,tablesorter

There is a lot of excessive, unnecessary code in the solution. Try this (demo): HTML <table id="clipsTable" class="tablesorter"> <thead> <tr> <th class="sorter-false">Fake order</th> <th class="sorter-false">Title</th> <th class="sorter-false">Description</th> <th class="sorter-false">Buttons</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Title for 1</td> <td>Description for 1</td> <td> <button>Hi...

Is it bad to supplement colspanned table with hidden cells?

javascript,html,tablesorter

Your technique certainly improves programmatic access to tables having colspans. If your colspan length is limited, you could avoid using hidden classes like this: td[colspan="2"]+td, td[colspan="3"]+td, td[colspan="3"]+td+td, td[colspan="4"]+td, td[colspan="4"]+td+td, td[colspan="4"]+td+td+td { display: none; } This throws an error in Safari: document.querySelectorAll('table tr:nth-child(2) td')[3].innerHTML This is resolved by indexing directly into...

Jquery tablesorter plugin is not working

javascript,jquery,tablesorter

You don't need to include 2 tablesorter library. You need just one. You could include just the "jquery.tablesorter.min.js". Look the difference between "file.js" and "file.min.js": What's the difference between jquery.js and jquery.min.js? And you also need to include jquery library. Example: <head> <title>Test Header</title> // Here you need to include...

Tablesorter Filter with multiple “values” in cell

jquery,filter,tablesorter

Using Motties help I achieved what I needed. I'm posting my solution for future use for users needing something similar. filter_selectSource: function (table, column, onlyAvail) { var arry = []; tds = $(table).find('tbody tr').find('td:eq('+column+')'); tds.find('.rip').each(function(i,n){ arry.push($(this).text()); }); return $.map(arry, function(n){ return n; }); } I guess this code can be...

TableSorter Math widget and Scroller widget not working together

jquery,jquery-plugins,tablesorter,jquery-widgets

The scroller widget creates up to four clones of the table when initialized. It has not yet been optimized to work with all the other widgets, especially widgets that manipulate the table content, like the math widget. I have created a new issue (https://github.com/Mottie/tablesorter/issues/957) so that you can keep track...

Sort Multiple Fields with jQuery Tablesorter Using Select Field

jquery,tablesorter

Instead of clearing out the col variable, you can just modify the filter for a specific column, like this: var cols = []; jQuery(".selectParty").bind('change', function (e) { cols[2] = $(this).val(); jQuery('table').trigger('search', [cols]); }); jQuery(".selectState").bind('change', function (e) { cols[0] = $(this).val(); jQuery('table').trigger('search', [cols]); }); ...

TableSorter Jquery — How to get values after filtering?

jquery,plugins,laravel-4,tablesorter

To make this work, you'll need a slightly modified version of the duration parser from this answer. Set the parser for that column by adding a "sorter-times" class name to the header cell. Then you'll need to include a custom widget to do the calculations (demo): $(function () { //...

Process CSV text within the DOM - JQuery CSV to Table

javascript,jquery,csv,tablesorter,jquery-csv

If you use my fork of tablesorter, there is a build widget which supports CSV to table via ajax. The build widget has the CSVToTable code built-in, so the options include the options from that plugin. CSV Album,Artist,Price ($) Lateralus,Tool,$13.00 Aenima,Tool,$12.00 "10,000 days",Tool,$14.00 Down In It,Nine Inch Nails,$3.00 Broken,Nine Inch...