Javascript nestedSortable当它成为子项时添加类
因此,如果你一直试图在“li”中添加一个类,当它是一个子项时 我试图添加的类是mjs nestedSortable no nesting,因此子项中不能有子项Javascript nestedSortable当它成为子项时添加类,javascript,jquery,nested-sortable,Javascript,Jquery,Nested Sortable,因此,如果你一直试图在“li”中添加一个类,当它是一个子项时 我试图添加的类是mjs nestedSortable no nesting,因此子项中不能有子项 <ol class="sortable ui-sortable mjs-nestedSortable-branch mjs-nestedSortable-expanded"> <li style="display: list-item;" class="mjs-
<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>
你能提供你写的代码吗?Hello Nir,我添加了我使用的html代码(如果它是子类或非子类的话,大部分php内容都没有排序)。对于javascript,我几乎使用默认代码,我知道我需要使用更新事件添加类,但我不知道从哪里开始。