Jscrollpane分页

发布于 2024-11-19 02:34:45 字数 623 浏览 3 评论 0原文

好吧,我是 jscrollpane 的新手,但到目前为止我一直做得很好,直到我将多个 Mysql 结果放在一个小 div 和一个分页类中。

滚动条第一次出现,但是一旦我单击第 2 页,并获取新行,滚动条就不会出现,这是分页方法,

$('#pagination a').click(function(){    
    $.getJSON($(this).attr('href')+'&isajax=true', function(json){          
        $('#mytableinfo').html(json.datos);         
        }
    );  

所以之后我需要重新初始化我的 jscrollpane 所以我尝试按照 jscrollpane 提供的方式执行此操作文档。

  var pane = $('.scroll-class')

    var api = pane.data('jsp');
      api.reinitialise();

我看不到任何滚动条不会出现的东西,这让我发疯。

如果我尝试在隐藏显示 div 后重新初始化它确实有效,但在更改整个 div 内容后我将无法工作

Well im new to jscrollpane but ive been doing well so far until i placed multiple Mysql Results within a small div and a pagination class.

The scrollbar apears the first time, but as soon as i click page 2, and get the new rows the scrollbar wont appear, this is the pagination method

$('#pagination a').click(function(){    
    $.getJSON($(this).attr('href')+'&isajax=true', function(json){          
        $('#mytableinfo').html(json.datos);         
        }
    );  

so after that i need to reinitialise my jscrollpane so i try to do this as provided by jscrollpane documentation.

  var pane = $('.scroll-class')

    var api = pane.data('jsp');
      api.reinitialise();

and i cant see anything the scrollbar just wont appear and its driving me nuts.

if i try to reinitialize after hiding-showing divs it does work , but i wont work after changing the whole div content

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

桜花祭 2024-11-26 02:34:45

尝试使用 autoReinitialise 参数:

$('.scroll-class').jScrollPane({ showArrows: true, autoReinitialise: true }

Try with the autoReinitialise parameter:

$('.scroll-class').jScrollPane({ showArrows: true, autoReinitialise: true }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文