jQWidgets Forums

jQuery UI Widgets Forums Layouts Splitter Splitter Panel width | Unit issue

This topic contains 2 replies, has 2 voices, and was last updated by  raj 9 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Splitter Panel width | Unit issue #78565

    raj
    Participant

    Hi,

    When I try to get the panel size it is returning in percentage(%) not in pixels? How to get the panel size in pixels?

    <div id='jqxSplitter'>
        <div style="background-color: #97FFAF"></div>
        <div style="background-color: #E8C0AF"></div>
    </div>
    <input type="button" id="getPanelSize" value="Panels Size" />
    
    $("#jqxSplitter").jqxSplitter({
        width: '100%',
        height: '300px',
        theme: 'energyblue',
        panels: [{ size: "42%", min:180, collapsible:false }, { size: '58%'}]
    });
    
    $("#getPanelSize").click(function(){
    var panels = $("#jqxSplitter").jqxSplitter("panels");
        alert(panels[0].size)
    });

    Can someone suggest me a solution?

    Regards,
    Raj

    Splitter Panel width | Unit issue #78569

    ivailo
    Participant

    Hi raj,

    If you set values in percentage – you will get values in percentage.
    So try to use values in pixels.
    Also as an workaround you can use .width() method about your panels and it will return values in pixels.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    Splitter Panel width | Unit issue #78572

    raj
    Participant

    Hi Ivailo,

    Thanks for your quick turnaround. It worked perfect 🙂

    Regrads,
    Raj

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

You must be logged in to reply to this topic.