ruby-on-rails - 使用 slim 时,脚踏分页无法正常工作

标签 ruby-on-rails pagination jquery-ui-sortable slim-lang footable

我正在使用 footable 作为索引页,我使用 slim 而不是 html,但是当我单击 footable 中的排序图标时,分页数字突然增加。

wrapper.wrapper-content.animated.fadeInRight
  .row
    .col-lg-12
      .ibox.float-e-margins
        .ibox-title
         h5 List of Organizations
        .ibox-content  
          table class="footable table table-stripped" data-page-size="10" 
           thead
            tr
             th Organization
             th Type
           tbody
            - @organizations.each do |f|
             tr
              td= f.name
              td= f.type   
           tfoot
            tr
             td colspan="2"
              ul class="pagination pull-right"
javascript:
$(function() {
$('.footable').footable();
});

在点击排序图标之前 enter image description here 单击排序图标后 enter image description here

我做错了什么吗,请提前告诉我,谢谢。

最佳答案

wrapper.wrapper-content.animated.fadeInRight
  .row
    .col-lg-12
      .ibox.float-e-margins
        .ibox-title
         h5 List of Organizations
        .ibox-content  
          table class="footable table table-stripped" data-page-size="10" 
           thead
            tr
             th Organization
             th Type
           tbody
            - @organizations.each do |f|
             tr
              td= f.name
              td= f.type   
           tfoot
            tr
             td colspan="2"
              ul class="pagination pull-right"
javascript:
  $(function() {
  $('.footable').footable();
  });

关于ruby-on-rails - 使用 slim 时,脚踏分页无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35099007/

相关文章:

ruby-on-rails - Rails 4 中自动加载 lib 文件

ruby-on-rails - 在rails项目中使用两个或多个数据库

ruby-on-rails - Ruby on Rails : Is there a way to make blank form inputs submit nil?

Silverlight:从服务器分页数据

php - CodeIgniter - 分页与删除冲突

ruby-on-rails - Rails find_by 和模型外键

reactjs - 检查 `TablePagination`的渲染方法

JQuery Sortable 以编程方式将项目设置为索引

jquery - 使用 Jquery UI sortable 一次对 2 个列表进行排序

javascript - jquery 2.1.1 可排序示例不起作用