问题
Because of a rotated content area, textoverflow, and a -webkit issue about the scroll bar not showing properly I've decided to use jscrollpane. For initial issue: Original Issue question to Sitepoint.
To prevent all that extra css code to create my own scrollbar for -webkit browsers I decided to use jscrollpane. It works accept for one major issue: The bottom several lines of text remain invisible! Please see: overflow: auto; with jscrollpane, but cutting off bottom text. How do I make it scrollable enabling all of the content to be visible?
Any help is appreciated.
PChuprina
回答1:
jScrollPane has some options for solving this:
autoReinitialise:true
(adds processing overhead.. use only if necessary)
http://jscrollpane.kelvinluck.com/auto_reinitialise.html
reinitialise()
(manually update pane size)
http://jscrollpane.kelvinluck.com/dynamic_content.html
回答2:
Welcome to stackoverflow!
This looks like a simple problem of timing. You are/something is altering the content of the scroll pane after the jsScrollPane()
function has run.
First try simply including it in a $(document).ready()
function. If that doesn't work go through your functions and check to see if any javascript is altering the size of that container and add jsScrollPane()
as a callback.
Pretty sure the first will work for you though :)
来源:https://stackoverflow.com/questions/6258178/bottom-content-cutoff-using-overflow-auto-and-jscrollpane