zgs225/easy-tree

All collapsed from the beginning

Opened this issue · 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 :)

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.

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 <notifications@github.com mailto:notifications@github.com> 写道:

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 #1 (comment).