Dynamic horizontal sizing of jscrollpane container div

1.9k Views Asked by At

I have a centered liquid layout that has a help/intro section at the top of each page. I use jQuery to hide/re-show the help content based on the user's needs. Under this, I have the rest of the page content, which uses jScrollPane to display overflow content.

When the help content is hidden, I need the jspContainer to resize to fill the area where the help content was (not just slide up, since this happens already). In other words, I need to fill the entire with the page's content, and have jScrollPane resize the along with the jsp scroll bars, etc.

I am using jQuery to dynamically re-draw the page anytime the onResize event is triggered, so I presume that I should insert the code in this event.

Any ideas?

2

There are 2 best solutions below

1
On

Have you tried using jQuery to make the div 100% width? Some example code would go a long way

$('#itemId').css({
    'width' : '100%'
});
0
On

It sounds like this example shows exactly what you are trying to do:

http://jscrollpane.kelvinluck.com/dynamic_width.html