Javascrpt super strong html table (table) specifies multi-column sorting

引用, a friend's click on a column sort, because the project needs to be transformed into a multi-column sort. Not much to say, directly on, jquery.js local to have it. Modify the local jquey directory directly and copy the following code.

TableSorter body{font-size:12px;line-height:25px;} tr{height:25px;} th{font-size:14px;border-bottom:solid 1px #DDDDDD;background-color:#EEEEEE;} td{font-size:12px;text-align:center;} .SortDescCss{background-image:url(http://k2046.cn/tb/Desc.gif);background-repeat:no-repeat;background-position:right center;} .SortAscCss{background-image:url(http://k2046.cn/tb/Asc.gif);background-repeat:no-repeat;background-position:right center;}

(function () {        var oldHTML =) {        var oldHTML =.fn.html; .fn.formhtml = function () {            if (arguments.length) return oldHTML.apply(this, arguments);.fn.formhtml = function () {            if (arguments.length) return oldHTML.apply(this, arguments);("input,textarea,button", this).each(function () { this.setAttribute('value', this.value); }); (":radio,:checkbox",this).each(function()if(this.checked)this.setAttribute(checked,checked);elsethis.removeAttribute(checked););(":radio,:checkbox",this).each(function()if(this.checked)this.setAttribute(checked,checked);elsethis.removeAttribute(checked););("option", this).each(function () {                 If (this.selected) this.setAttribute('selected', 'selected');                 Else this.removeAttribute('selected');             });             Return oldHTML.apply(this);         };     })(jQuery);     /*Instructions for use :     method 1:      Var tbl = new TableSorter("tb1");      //Parameter name is the serial number of the table column, type is the data format (1: character, 2: number)      Var p = [{ "name": 4, "type": 1 }, { "name": 5, "type": 2}];      tbl.Sort( p ) ;     */     Function TableSorter(table) {         this.Table = this.dom(table);         If (this.Table.rows.length