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');
}
});
});
精彩评论