user1493948
user1493948

Reputation:

Resizing jScrollPane when dropdowns are expanded

I'm trying to add the jScrollPane custom bar to this menu which has dropdown links within it. I need the scroll bar to resize upon click and dynamic content being added to the menu. any ideas of how to do this.

Example of the issue http://jsfiddle.net/1eddy87/7zXPB/5/

I tried to append content however had no success. example below

$(function()
{
    // Initialise the scrollpanes
    $('.scroll-pane').jScrollPane();

    // Add some content to #pane2
    var pane2api = $('#pane2').data('jsp');
    var originalContent = pane2api.getContentPane().html();
    pane2api.getContentPane().html(originalContent + originalContent + originalContent);

    // Reinitialise the #pane2 scrollpane
    pane2api.reinitialise();
}); 

Here are some working examples:

  1. http://jscrollpane.kelvinluck.com/less_basic.html
  2. " /dynamic_content.html "

Upvotes: 0

Views: 134

Answers (0)

Related Questions