It\'s the billing list:
Service Price
---------------
S1 13 CHF
S2 Free
S3 Free
S4 40 CHF
I want to sort it by pr
If you don't want to use heavy plugins, you cant to sort it manually:
$(function(){
var table=$('#table');
var rowsArray=$('tr',table).sort(function(current,next){
var compareCurrent=$('td.price',current).text().toUpperCase();
var compareNext=$('td.price',next).text().toUpperCase();
return (compareCurrent compareNext) ? 1 : 0;
});
$('tr',table).remove();
$.each(rowsArray,function(index,element){
$(element).appendTo(table)
})
})
In this example you should add class "price" to cells with prices. Or you can use pseudo-selector ":last-child".