jQWidgets Forums

jQuery UI Widgets Forums Layouts Splitter Expand and collapse split pane on click

This topic contains 4 replies, has 2 voices, and was last updated by  abc 12 years, 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Expand and collapse split pane on click #9175

    abc
    Participant

    If split pane is already expanded then on click of button it should be collapsed and if it is collapsed then on click of same button it should be expanded,

    how to check that the split pane is expanded/collapsed?

    Expand and collapse split pane on click #9178

    Peter Stoev
    Keymaster

    Hi abcd,

    There are expanded/collapsed events which you can use to determine whether a split panel is expanded/collapsed. I suggest you to take a look at this sample: jquery-splitter-events.htm.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Expand and collapse split pane on click #9273

    abc
    Participant

    Hi Peter,

    I wrote the following code, but it is not working….
    i know i’m doing it in wrong way…… plz tell me the solution….

    I want to expand/collapse splitter on click of ‘Show/Hide’ button…
    (If splitter is expanded then on button click it should collapse and on next click it should expand and so on…)

    function showOrHide(){
    $(‘#MainSplitter’)
    .bind(‘expanded’,
    function (event) {
    $(‘#MainSplitter’).jqxSplitter(‘collapseAt’, 0);
    }
    );

    $(‘#MainSplitter’)
    .bind(‘collapsed’,
    function (event) {
    $(‘#MainSplitter’).jqxSplitter(‘expandAt’, 0);
    }
    );
    }

    Expand and collapse split pane on click #9277

    Peter Stoev
    Keymaster

    Hi abcd,

    Save the expand/collapse state of the Splitter in the expanded/collapsed events. Create a button and bind to its click event. Depending on the expand/collase state( this could be a boolean flag), call the Splitter’s collapseAt or expandAt method.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Expand and collapse split pane on click #9318

    abc
    Participant

    Hi Peter,

    Thank you so much..

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

You must be logged in to reply to this topic.