Custom Sorting of jQuery dataTable Columns

后端 未结 2 791
一向
一向 2020-12-06 17:10

I have a table which contains columns of numbers and NA.


    NA


    1024
         


        
2条回答
  •  不思量自难忘°
    2020-12-06 17:36

    Simply use data-order attribute in element. Plugin will sort based on that. For your case the HTML will be:

    
        NA
    
    
        1024
    
    
        100
    
    
        200
    
    
        300
    
    
        2096
    
    

    More HTML5 attributes are available to solve problems of filtering, sorting, searching, etc.

    https://datatables.net/examples/advanced_init/html5-data-attributes.html

提交回复
热议问题