EasyUI Forum
May 21, 2024, 05:48:26 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: easyui-panel expand when click header  (Read 3787 times)
MSAG
Newbie
*
Posts: 41



View Profile Email
« on: November 10, 2018, 06:14:07 AM »

Code Not work
can any one help me


    <div id="pid" class="easyui-panel" style="width:300px;height:200px" data-options="iconCls:'icon-save',collapsible:true,minimizable:true,maximizable:true,closable:true"         title="My Panel">
    </div>
    <script type="text/javascript">
        var p = $('#pid');
        p.panel('header').click(function () {
            if (p.panel('options').collapsed) {
                p.panel('expand', true);
            } else {
                p.panel('collapse', true);
            }
        });
    </script>
Logged
spider58
Newbie
*
Posts: 32


View Profile
« Reply #1 on: November 10, 2018, 02:23:56 PM »

Code Not work
can any one help me


    <div id="pid" class="easyui-panel" style="width:300px;height:200px" data-options="iconCls:'icon-save',collapsible:true,minimizable:true,maximizable:true,closable:true"         title="My Panel">
    </div>
    <script type="text/javascript">
        var p = $('#pid');
        p.panel('header').click(function () {
            if (p.panel('options').collapsed) {
                p.panel('expand', true);
            } else {
                p.panel('collapse', true);
            }
        });
    </script>

you can do that with click an icon. please check this page.

https://www.jeasyui.com/demo/main/index.php?plugin=Panel&theme=material-teal&dir=ltr&pitem=&sort=asc

You can find sampe code at "Panel Tools" link
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!