I have such html table:
here: http://jsfiddle.net/zrjaM/1/
And such js for sorting:
$(document).ready(function() {
$(".sortable")
.tablesorter({sortList: [[4,0]], widgets: ['zebra']});
});
But i need to sort via 0-th column to…. i write:
$(document).ready(function() {
$(".sortable")
.tablesorter({sortList: [[0,0],[4,0]], widgets: ['zebra']});
});
but it works strange…
Also i need to do that, tr’s with price value (4-th column) are on top, but now, when i sort only by price – all is ok, but when via two columns, i could have tr’s with price both in end or middle…. How to send them to top, and sort first via 0-th, then via sorter 0-th sort via 4-t column…. How to do it?
I figured out a possible solution.
First check rows for no price, if no price add a hidden span before item name in first column the text
ZZZZZZZin it. This forces all theZZZZZZZitems to bottom and you get a double sort alphabetic on first rowDEMO: http://jsfiddle.net/zrjaM/6/