Side navigation
#2719 closed enhancement (invalid)
Opened April 19, 2008 08:22AM UTC
Closed May 03, 2008 06:32AM UTC
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>
Attachments (0)
Change History (1)
Changed May 03, 2008 06:32AM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
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.