diff --git a/README.md b/README.md index ffd2077d..9f03f83e 100644 --- a/README.md +++ b/README.md @@ -589,6 +589,15 @@ This method is designed to get the hierarchy relationships of orgchart for furth +### Tips +- **How can I deactivate expand/collapse feature of orgchart?**(inspired by the [issue](https://github.com/dabeng/OrgChart/issues/25). Thank der-robert and ActiveScottShaw for their constructive discussions:blush) +Users can enable/disable exapand/collapse feature with className "noncollapsable" as shown below. +```js +$('.orgchart').addClass('noncollapsable'); + +$('.orgchart').removeClass('noncollapsable'); +``` + ## Browser Compatibility - Chrome 19+ - Firefox 4+ diff --git a/dist/css/jquery.orgchart.css b/dist/css/jquery.orgchart.css index a3930e22..022e170d 100644 --- a/dist/css/jquery.orgchart.css +++ b/dist/css/jquery.orgchart.css @@ -267,6 +267,10 @@ -webkit-transition: .2s; } +.orgchart.noncollapsable .node .edge { + display: none; +} + .orgchart .edge:hover { color: #449d44; cursor: pointer; diff --git a/examples/css/jquery.orgchart.css b/examples/css/jquery.orgchart.css index a3930e22..022e170d 100644 --- a/examples/css/jquery.orgchart.css +++ b/examples/css/jquery.orgchart.css @@ -267,6 +267,10 @@ -webkit-transition: .2s; } +.orgchart.noncollapsable .node .edge { + display: none; +} + .orgchart .edge:hover { color: #449d44; cursor: pointer;