EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: BinaryCode on February 23, 2014, 07:12:34 PM



Title: collapse and expand By Double Click Panel Header
Post by: BinaryCode on February 23, 2014, 07:12:34 PM
Hello Eveybody,

I have case with easyui, and i have try to solve my problem, but can't, my question is:

1. How i can change tab title?  (Solved)
2. how collapse and expand by double click/or click header panel?

TIA,

B.C


Title: Re: collapse and expand By Double Click Panel Header
Post by: stworthy on February 24, 2014, 05:55:31 PM
Try this.
Code:
var t = $('#tt');
$.map(t.tabs('tabs'), function(p){
    p.panel('options').tab.bind('dblclick', function(){
        if (p.panel('options').collapsed){
            p.panel('expand');
        } else {
            p.panel('collapse');
        }
    });
});


Title: Re: collapse and expand By Double Click Panel Header
Post by: BinaryCode on March 02, 2014, 03:25:23 AM
hi stworthy,

Thank your for your help, finnally problem solve, just bind selector div id with click/dblclick event

Regards
B.C