Nestable2
Nestable2 copied to clipboard
Empty div doesn't go away after adding nodes
Using $('.dd').nestable('add', jsonObj)
on an empty initial container like
<div id="selections_nested" class="col-md-6">
<ol class="dd-list"></ol>
</div>
will produce an empty div <div class="dd-empty"/>
remaining regardless of how many nodes I've add. This empty div was initiated but should be removed when new nodes are added and the tree is no longer empty.
I have added a line in 251 to check if the the tree contains an empty div and remove it if it exists:
if(tree.find('.'+this.options.emptyClass))
this.removeEmptyElement(this.el);
Let me know if this is a good fix or is there any better way.