开发者

Is it possible to destroy "sortable" when "sortstart" starts?

Here is my code:

$(".myclass").bind( "sortstart", function(event, ui) 
{ 
   $('#div_1').sortable('destroy');
   $("#div_1 .li_1开发者_运维问答").droppable(
   {
      hoverClass: 'red',
      drop: function(event, ui)
      {
         $(this).addClass('red');           
      }
    });
});

Can anyone help me identify what is wrong?


I got it :)

$(".myclass").bind('mousedown',function()
{ 
   $('#div_1').sortable('destroy'); 
    });

$(".myclass").bind( "sortstart", function(event, ui) 
{
   $("#div_1 .li_1").droppable(
   {
      hoverClass: 'red',
      drop: function(event, ui)
      {
         $(this).addClass('red');           
      }
    });
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜