This demonstration shows how you can tell jScrollPane to automatically reinitialise itself. You do this by passing in resizeSensor: true as a setting. If you do this then the scrollpane attempts to reinitialise any time it detects a change in the content size.
Note this will work fine in most cases, however if content is absolutely positioned it may be unable to detect changes. If that is the case autoReinitialise can be used instead.
The contents of this div will be replaced by the CSS added to this page