Why jquery ui draggable is slow in this example

On jquery ui, drag-and-drop examples are fast. But with this markup, the plugin is very slow:

$("ul.projects").sortable({
    items: ".ui-state-default",
  containment:"parent",
  cursor:"move",
  cursorAt:{left: 90}
});

Codepen

+4
source share
1 answer

Remove all transitions for ul.projects li. This makes the animation slow. Or turn them off for .ui-sortable-helper:

ul.projects li:not(.ui-sortable-helper) {
  float: left;
  margin: 0px 6.5px 12px;
  cursor: pointer;
  -webkit-transition: all 0.2s linear;
  -moz-transition: all 0.2s linear;
  -ms-transition: all 0.2s linear;
  -o-transition: all 0.2s linear;
  transition: all 0.2s linear;
}
+17
source

Source: https://habr.com/ru/post/1547641/


All Articles