开发者

Jscrollpane pagination

开发者 https://www.devze.com 2023-03-18 08:47 出处:网络
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.

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 scr开发者_如何学运维ollbar 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


Try with the autoReinitialise parameter:

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号