如何一次拖放菜单及其对应的子菜单。 [英] How Can I Drag And Drop Menu And Its Corresponding Submenu At A Time.

查看:84
本文介绍了如何一次拖放菜单及其对应的子菜单。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望一次拖放菜单和sumenu,现在它正在为父菜单darg和drop工作。我希望相应的子菜单应该拖放。页面刷新后一切都很顺利。我试过了很多,但没有得到任何解决方案,下面是我的编码.plz帮助我。





 < script src =// code.jquery.com/jquery-1.10.2.js\"></script> 
< script type =text / javascriptsrc =http://code.jquery.com/ui/1.11.4/jquery-ui.js>< / script>
< script type =text / javascript>
var jq = $ .noConflict();
jq(function(){
var strURL ='<?php echo HTTP_ROOT;?>';
jq(#list)。sortable({class:'move' ,更新:function(){
var order = jq('#list')。sortable('serialize');
alert(order);
$ .post(strURL +menus) / reorder,order,function(theResponse){

});

}

});

});

< / script>





ctp page





< pre lang =xml> < table class = table < span class =code-keyword>>
< thead >
< tr >
< th width = 5% > Sl否< /日 >

< > 菜单< / th >
< > 分配页面< / th >
< th style = text-align:center; > 操作< / th >
< / tr >
< / thead >
< tbody id =' list' >
< tr > < / tr < span class =code-keyword>> //父菜单
< tr > < / tr > //子菜单
< tr > < / tr > //子菜单的子菜单

< / tbody >
< / table >

解决方案

.noConflict();
jq(function(){
var strURL ='<?php echo HTTP_ROOT;?>';
jq(#list)。sortable({class:'move' ,更新:function(){
var order = jq('#list')。sortable('serialize');
alert(order);


。 post(strURL +menus / reorder,order,function(theResponse){

});

}

});

});

< / script>





ctp page





< pre lang =xml> < table class = table < span class =code-keyword>>
< thead >
< tr >
< th width = 5% > Sl否< /日 >

< > 菜单< / th >
< > 分配页面< / th >
< th style = text-align:center; > 操作< / th >
< / tr >
< / thead >
< tbody id =' list' >
< tr > < / tr < span class =code-keyword>> //父菜单
< tr > < / tr > //子菜单
< tr > < / tr > //子菜单的子菜单

< / tbody >
< / table >


我认为您正在搜索: http://touchpunch.furf.com/ [ ^ ]


Iwant to drag and drop both menu and sumenu at a time ,now for the time it is working for parent menu darg and drop.I want that corresponding submenu should drag and drop.After page refreshing everything comes fine .I have tried a lot,but not getting any solution for it,below is my coding.plz help me.


<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script type="text/javascript">
    var jq = $.noConflict();
    jq(function() {
        var strURL = '<?php echo HTTP_ROOT; ?>';
        jq("#list").sortable({class: 'move', update: function() {
                var order = jq('#list').sortable('serialize');
              alert(order);
                $.post(strURL + "menus/reorder", order, function(theResponse) {

                });

            }

        });

    });

</script> 



ctp page


<table class="table">
    <thead>
        <tr>
            <th width="5%">Sl No</th>

            <th>Menu</th>
            <th>Assign Page</th>
            <th style="text-align:center;">Action</th>
        </tr>
    </thead>
    <tbody id='list'>
        <tr></tr>//parent menu
        <tr></tr> //submenu
        <tr></tr> //submenu of submenu

    </tbody>
</table>

解决方案

.noConflict(); jq(function() { var strURL = '<?php echo HTTP_ROOT; ?>'; jq("#list").sortable({class: 'move', update: function() { var order = jq('#list').sortable('serialize'); alert(order);


.post(strURL + "menus/reorder", order, function(theResponse) { }); } }); }); </script>



ctp page


<table class="table">
    <thead>
        <tr>
            <th width="5%">Sl No</th>

            <th>Menu</th>
            <th>Assign Page</th>
            <th style="text-align:center;">Action</th>
        </tr>
    </thead>
    <tbody id='list'>
        <tr></tr>//parent menu
        <tr></tr> //submenu
        <tr></tr> //submenu of submenu

    </tbody>
</table>


I think you are searching for this : http://touchpunch.furf.com/[^]


这篇关于如何一次拖放菜单及其对应的子菜单。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆