Bug Tracker

Opened 12 years ago

Closed 12 years ago

#2719 closed enhancement (invalid)

ui.droppable very slow

Reported by: aiiiq Owned by: paul
Priority: major Milestone: 1.2.4
Component: ui Version: 1.2.3
Keywords: Cc:
Blocked by: Blocking:

Description

There're 100 DIV need drag&drop. Make them draggable only, it's veryfast. I think the problem is in droppable. How to make it faster? Thanks!

<html> <script src="jquery-1.2.4a.js"></script> <script src="ui.base.js"></script> <script src="ui.draggable.js"></script> <script src="ui.droppable.js"></script> <style> .mydrag {width:100px; height:100px; margin:10px; float:left; cursor:pointer; background-color:#68BFEF;} </style> <script> $(document).ready(function(){

for (var div,i=1; i<=100; i++) {

div += '<div id="'+i+'" class="mydrag">'+i+'</div>';

} $(div).appendTo("body");

$('.mydrag').draggable({

helper: 'clone'

});

$('.mydrag').droppable({

accept: '.mydrag', drop: function(ev, ui) {

$(this).append($(document.createElement('div')).text($(ui.draggable).attr('id')+'->'+$(this).attr('id')));

}

});

}); </script> </html>

Change History (1)

comment:1 Changed 12 years ago by paul

Resolution: invalid
Status: newclosed

There is no way to make it faster, in general - however, we made a lot if improvements recently, so I suggest to grab the latest copy from the trunk.

Note: See TracTickets for help on using tickets.