jQWidgets Forums

jQuery UI Widgets Forums Navigation Tabs Adding tab with splitter

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 12 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Adding tab with splitter #16270

    crunch
    Member

    I’ve run into a problem with dynamically adding a tab that contains a splitter. When I add a new tab and configure the splitter in the new tab it seems to mess up the splitter in the previous tab. I reproduced the problem with a small sample (copied from one of the tab samples), here it is:

    —-

    $(document).ready(function () {
    $(‘#jqxTabs’).jqxTabs({
    height: 220,
    width: 510,
    theme: ‘energyblue’
    });
    // Set up splitter for tab one
    $(“#tabSplitter1”).jqxSplitter({ height: ‘100%’, width: ‘100%’, orientation: ‘horizontal’,
    panels: [{ size: ‘60%’ }, { size: ‘40%’}]
    });
    // Create and initialize utton
    $(‘#Add’).jqxButton({ width: ‘100px’, theme: ‘energyblue’ });
    // Add
    $(‘#Add’).click(function () {
    $(‘#jqxTabs’).jqxTabs(‘addLast’, ‘Tab Two’,

    Top
    Bottom

    “);
    $(“#tabSplitter2”).jqxSplitter({ height: ‘100%’, width: ‘100%’, orientation: ‘horizontal’,
    panels: [{ size: ‘60%’ }, { size: ‘40%’}]
    });
    });
    });

    Tab with splitter

    Top
    Bottom

    —-

    After clicking the ‘add’ button it will (correctly) add the second tab with the splitter. However, switching to the first tab will show that the content is now only partly visible and splitter resize doesn’t work anymore. It seems that adding the second tab/splitter somehow messes up the first tab.

    Hopefully you can give me some guidance how to fix this issue.

    Best regards,

    Ton

    Adding tab with splitter #16285

    Dimitar
    Participant

    Hello Ton,

    Please post your code sample again and format it as explained in the forum topic Code Formatting.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.