Skip to content
This repository was archived by the owner on Aug 2, 2019. It is now read-only.

Commit bcee01e

Browse files
author
tchapi
committed
Add a start-collapsed behaviour
.. following https://github.com/vincenttheeten 's PR dbushell#103
1 parent e6ffb95 commit bcee01e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

jquery.nestable.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@
7474
list.placeEl = $('<div class="' + list.options.placeClass + '"/>');
7575

7676
$.each(this.el.find(list.options.itemNodeName), function(k, el) {
77-
list.setParent($(el));
77+
var item = $(el),
78+
parent = item.parent();
79+
list.setParent(item);
80+
if (parent.hasClass(list.options.collapsedClass)) {
81+
list.collapseItem(parent.parent());
82+
}
7883
});
7984

8085
list.el.on('click', 'button', function(e) {

0 commit comments

Comments
 (0)