why the contents goes up when user change the div content in jquery +iscroll?

79 views Asked by At

I am using iscroll library .My problem is that when I scroll the content my contends goes hide.I make some demo on fiddle . http://jsfiddle.net/naveennsit/JpvAy/14/

I set static value on div and scroll content. It's working fine, but on button click I change the content of scroller div (with refresh scroll ). Then it hide the content when I scroll up and down.

It mean that if user replace large content to small div content it show some problem in scrolling (some part is hide above and below).

$(document).on("click", "#test", function () {
    //alert($('#scroller').text());
    $('#scroller').text('');
    myScroll.refresh();
     $('#scroller').text('Ricky Thomas Ponting, AO (born 19 December 1974), nicknamed Punter, is an Australian cricketer, and former captain of the Australia national cricket team betweer.');
     myScroll.refresh();
});

Thanks

0

There are 0 answers