jQuery DataTables sDom order not work

前端 未结 1 842
陌清茗
陌清茗 2021-01-26 17:10

I need the \"filter\" in the upper left side and the \"size\" in the upper right side, but is not working:

$(document).ready(function() {
    jQuery(\'#example\'         


        
相关标签:
1条回答
  • 2021-01-26 18:06

    SOLUTION

    • Use these two CSS rules to target all data tables:

      .dataTables_wrapper .dataTables_filter {
        float: left;
      }
      
      .dataTables_wrapper .dataTables_length {
        float: right;
      }
      
    • Use these two CSS rules to target #example data table:

      #example_wrapper .dataTables_filter {
        float: left;
      }
      
      #example_wrapper .dataTables_length {
        float: right;
      }
      

    DEMO

    See this jsFiddle for code and demonstration.

    0 讨论(0)
提交回复
热议问题