I'm using jScrollPane to create scrollbars for my website and I have an unordered list that loads a variable amount of list items. On the page load, the scrollbar's size fits properly to the FULL list. However, using jQuery I have classes on the list items to show and hide certain list items with certain classes depending on button presses. How do I force the jScrollPane to reevaluate the size of the visible information so as to accomodate size changes of the visible list items.
Here is the code that I used in my java file, but clearly it's wrong because it doesn't resize properly, presuma开发者_开发技巧bly because there are still the list items in unordered list, it's simply the case that their display status is set to 'none'.
scrollbarSizeChange = function() {
$('.scroll-pane').jScrollPane({showArrows: false});
$('.scroll-pane').data('jsp').reinitialise();
}
I suppose more succinctly put: How do I reset the jScrollPane scrollbar size to accomodate list items with the 'display: inline-block' property and exclude list items with the 'display: none' property?
精彩评论