Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All collapsed from the beginning #1

Open
umutilbas opened this issue Feb 23, 2015 · 2 comments
Open

All collapsed from the beginning #1

umutilbas opened this issue Feb 23, 2015 · 2 comments

Comments

@umutilbas
Copy link

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 :)

@raphaelbs
Copy link

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.

@zgs225
Copy link
Owner

zgs225 commented Jun 23, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants