如何使用淘汰赛Jquery表格分类器

我有一个表,我需要应用排序.我正在使用knockout和jquery.tablesorter.js.我也尝试过自定义绑定,但没有帮助.没有淘汰我的代码工作正常.以下是我的表格.
<table class="tbl" id="dash" data-bind="sortTable: true">
      <thead>
        <tr class="tag close">
          <th>Type</th>
          <th>Title</th>
        </tr>
      </thead>
      <tbody class="scrollContent" data-bind="foreach: Course">
        <tr>
          <td><i class="icon"></i></td>
          <td><a href="#" id="qtipselector_01" data-bind="text: Title"></a></td>
          <div id="TooltipContent_01" class="hidden">
            <a> Test Tool Tip</a>                 
          </div>
      </div>
    </tr> 
  </tbody>
 </table>

解决方法

这是一个例子: http://jsfiddle.net/jearles/RGsEH/

注意:JS和CSS文件依赖项是在Managed Resources下引入的.

HTML

<table data-bind="sortTable: true">
  <thead>
    <tr>
      <th>Type</th>
      <th>Title</th>
    </tr>
  </thead>
  <tbody data-bind="foreach: course">
   <tr>
      <td data-bind="text: type"></td>
      <td data-bind="text: title"></td>
    </tr> 
  </tbody>
 </table>

JS

function Course(type,title) {
    this.type = type;
    this.title = title;
}

var viewmodel = function() {
    this.course = ko.observableArray([
        new Course("type","course1"),new Course("another_type","course2"),new Course("second_type","course5"),new Course("third_type","course4"),new Course("fourth_type","course3")        
    ]);
}

ko.bindingHandlers.sortTable = {
    init: function(element,valueAccessor) {
        setTimeout( function() {
            $(element).addClass('tablesorter');
            $(element).tablesorter({widgets: ['zebra']});
        },0);
    }
};

ko.applyBindings(new viewmodel());

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: &lt;span id=&quot...
jQuery 添加水印 &lt;script src=&quot;../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...