EasyUI 拖拽

来源:互联网 发布:网易公开课优缺点知乎 编辑:程序博客网 时间:2024/05/29 09:25

拖拽

$(divListItem).draggable({                revert:true,                proxy:'clone',                onStartDrag: function () {                     $(this).draggable('options').cursor = 'not-allowed';                     var proxy = $(this).draggable('proxy').css('z-index', 10);                     proxy.hide();                     setTimeout(function(){                         proxy.show();                     }, 100);                 },                 onDrag: function(){                     $(this).draggable('proxy').show();                 },                 onStopDrag: function () {                     $(this).draggable('options').cursor = 'move';                 }            });

放置

    $('.div_Polling_list').droppable({ //放置                onDragEnter:function(e,source){                    $(source).draggable('options').cursor='auto';                },                onDragLeave:function(e,source){                    $(source).draggable('options').cursor='not-allowed';                },                onDrop:function(e,source){                    var epid = $(source).attr('no');                    var meetName = $(source).find('.div_list_item_name').html();                    var meet164 = $(source).find('.div_list_item_number').html();                    var meetIp = $(source).find('.div_list_item_ip').html();                    var itemClass = $(source).find('.div_list_item_img').attr("class");                    if(itemClass.indexOf("watch") > -1){                        addConftempMeetListItem("pollinglist", epid, meetName, meet164, meetIp, "", "2");                    }                    else{                        addConftempMeetListItem("pollinglist", epid, meetName, meet164, meetIp, "", "1");                    }                }    });
0 0
原创粉丝点击