因此,如果一直试图将一个类添加到' li'当它来到一个子项目时。
我尝试添加的类是mjs-nestedSortable-no-nesting,因此你不能在子项中包含子项。
<ol class="sortable ui-sortable mjs-nestedSortable-branch mjs-nestedSortable-expanded">
<li style="display: list-item;" class="mjs-nestedSortable-leaf" id="menuItem_<?=$row['MAINCATID']; ?>">
<div class="menuDiv">
<span>
<span data-id="<?=$row['MAINCATID']; ?>" class="itemTitle"><input type="text" class="form-control vasteWidth inputNamen" value="<?=$row['MAINCATNAAM']; ?>"></span>
<span title="Click to delete item." data-id="<?=$row['MAINCATID']; ?>" class="deleteMenu pull-right fa fa-times-circle fa-3x"></span>
</span>
</div>
<ol>
<li style="display: list-item;" class="mjs-nestedSortable-no-nesting" id="menuItem_<?=$s['MAINCATID']; ?>">
<div class="menuDiv">
<span>
<span data-id="<?=$s['SUBCATID']; ?>" class="itemTitle"><input type="text" class="form-control vasteWidth inputNamen" value="<?=$s['SUBCATNAAM']; ?>"></span>
<span title="Click to delete item." data-id="<?=$s['SUBCATID']; ?>" class="deleteMenu pull-right fa fa-times-circle fa-3x"></span>
</span>
</div>
</li>
</ol>
</li>
</ol>