Reputation: 3280
I use jscrollpane in my horizontal divison where jscroll help to scroll . Problem is divison data is loaded with the help of ajax. And jscrollpane doesn't show scrollbar until the width of browser is changed.
As i am using
api.reinitialise();
Method to reinitialise scrollbar on width change. So can anyone provide me solution so that once a data is loaded with the help of ajax after that it automatically reinitialise and shows me the scroll bar.
Also i load the data from json and parse it so it takes time to load into browser.
Upvotes: 0
Views: 112
Reputation: 5728
You should initialise jscrollpane scrollers after ajax data is loaded. if you use jscrollpane before. it wont show.
Thats why when you resize the browser window the api.reinitialise(); works to load jscrollpane automatically and adjust its width with respect to browser window.
Call jscrollpane when your ajax data is loaded into division.
For eg
$('#div').load('x.json');
$('#div').jScrollPane();
or
$('#div').load('x.json').jScrollPane();
Upvotes: 2