easy-tree icon indicating copy to clipboard operation
easy-tree copied to clipboard

All collapsed from the beginning

Open umutilbas opened this issue 10 years ago • 2 comments

Hello,

Is it possible to start the tree menu with all the menus are collapsed? I do not really understand from js have tried as much I can try but no result. If anyone can help I would be appreciated :)

umutilbas avatar Feb 23 '15 10:02 umutilbas

Hi.

I had the same problem and I wrote this function to collapse all menus that are shown.

function closeEasyTree(){
    var parent = $(".easy-tree").find('li.parent_li');
    var children = parent.find(' > ul > li');
    if (children.is(':visible')) {
        children.hide('fast');
        parent.children('span').attr('title', "expandir").find(
                ' > span.glyphicon').addClass(
                'glyphicon-folder-close').removeClass(
                'glyphicon-folder-open');
    }
}

Just call it whenever you like and they will collapse.

raphaelbs avatar Jun 05 '15 17:06 raphaelbs

Hi,

Thank you for your feedback. Thank you very much. I’ll fix this issue soon.

But, this repository has been deprecated long time. I prefer you use other better jQuery tree plugin, such as jqTree, z_Tree etc.

在 2015年6月6日,01:37,Raphael Brandão <[email protected] mailto:[email protected]> 写道:

Hi.

I had the same problem and I wrote this function to collapse all menus that are shown.

function closeEasyTree(){ var parent = $(".easy-tree").find('li.parent_li'); var children = parent.find(' > ul > li'); if (children.is http://children.is/(':visible')) { children.hide('fast'); parent.children('span').attr('title', "expandir").find( ' > span.glyphicon').addClass( 'glyphicon-folder-close').removeClass( 'glyphicon-folder-open'); } } Just call it whenever you like and they will collapse.

— Reply to this email directly or view it on GitHub https://github.com/zgs225/easy-tree/issues/1#issuecomment-109372512.

zgs225 avatar Jun 23 '15 02:06 zgs225