使用jquery.nestable.js添加点击事件

时间:2024-04-04 22:37:45

使用jquery.nestable.js添加点击事件

html:

<ol class="dd-list">
<li class="dd-item" data-id="">
    <div class="dd-handle">
        <span class="label label-info"><i class="fa fa-cog"></i></span> 

    </div>
    <div><input style="margin-left: 200px"  type="radio" value="" name="1" class="checks"></div>
    <button class="dd-demo" onclick="edit()"></button>
    <button class="dd-demo1" onclick="model_menu_del()">11</button>
</li>
</ol>


style:主要是添加绝对定位
<style>
    #nestable2 .dd-item >.dd-demo::before{content:  "编辑";width: 40px;height: 30px;line-height: 30px;top: -0px;border-radius: 2px;color: orange;
    }
    #nestable2 .dd-item >.dd-demo1::before{content:  "删除";width: 40px;height: 30px;line-height: 30px;top: -0px;border-radius: 2px;color: red;}
    button.dd-demo{position: absolute;top: 0px;right: 50px;}
    button.dd-demo1{position: absolute;top: 0px;right: 0px;}
    input.checks{position: absolute;top: 0px;right: 100px;margin-top: 15px}
</style>