简体   繁体   English

Jquery排序表

[英]Jquery sort table

I have such html table structure: 我有这样的html表结构:

<table cellpadding="0" cellspasing="0" class="tablesorter zebra" id="articles-table">

    <tbody>...etc standart stuff...
    <tr>
    <td>
    </td>
    </tr>
    then i have 
    <tr id="123">
    <td>
    <td>
    </td>
    </td>
    <tr>
    ...
    </table> 

I need to sort via my float number, which is in second div only! 我需要通过我的浮点​​数排序,这只是在第二个div中! in tr with id = 123, this is important... Also all solutions i see in web are to huge... I just need simple sort second td in some tr with specific id... How can i solve it? 在id = 123的tr中,这很重要...我在网上看到的所有解决方案都是巨大的......我只需要在某些特定id中使用简单排序第二个td ...我该如何解决?

I tried tablesorter.com. 我试过tablesorter.com。 but it is not my... Can't customize it only for some tr... Also i need it to be sorter if document is loaded. 但它不是我的...不能只为一些tr定制它...我还需要它作为分类器,如果文件加载。

I would highly advise looking into the jquery library datatables. 我强烈建议查看jquery库数据表。 It basically does everything you would ever need to with tables for you. 它基本上可以为您提供桌子所需的一切。 You can find more information here: 您可以在这里找到更多信息:

http://datatables.net/ http://datatables.net/

查看tablesorter.com插件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM