开发者

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

开发者 https://www.devze.com 2023-01-09 00:34 出处:网络
Here is my code: $(\".myclass\").bind( \"sortstart\", function(event, ui) { $(\'#div_1\').sortable(\'destroy\');

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

精彩评论

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