Can't get to work Hidden title numeric sorting

Can't get to work Hidden title numeric sorting

marcopolomarcopolo Posts: 1Questions: 0Answers: 0
edited May 2013 in General
[code]
jQuery.fn.dataTableExt.oSort['title-numeric-asc'] = function(a,b) {
var x = a.match(/title="*(-?[0-9]+)/)[1];
var y = b.match(/title="*(-?[0-9]+)/)[1];
x = parseFloat( x );
y = parseFloat( y );
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
};

jQuery.fn.dataTableExt.oSort['title-numeric-desc'] = function(a,b) {
var x = a.match(/title="*(-?[0-9]+)/)[1];
var y = b.match(/title="*(-?[0-9]+)/)[1];
x = parseFloat( x );
y = parseFloat( y );
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
};

$(document).ready(function()
{
$('#pr_code_stats').dataTable({
"aoColumns": [
null,
null,
null,
null,
null,
{"sType": "title-numeric"}
],
"sDom": "<'row'<'span10'l><'span10'f>r>t<'row'<'span10'i><'span10'p>>",
"sPaginationType": "bootstrap",
"sWrapper": "dataTables_wrapper form-inline",
"iDisplayLength": 25,
"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
"fnFooterCallback": function(nRow, aaData, iStart, iEnd, aiDisplay)
{
var page_clicks_sum = 0;
var page_accounts_sum = 0;
var page_trials_sum = 0;
var page_sales_sum = 0;

var total_clicks_sum = 0;
var total_accounts_sum = 0;
var total_trials_sum = 0;
var total_sales_sum = 0;

/*calculate totals for all data*/
for (var i = 0; i
This discussion has been closed.