开发者

Jscrollpane pagination

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜