The joy of the jQuery drag-and-drop API just opened up, but I want to display my list using the built-in block. This makes the list items jump when you drag them, does anyone know how to fix this?
The code I use is:
$(function() { $( "#sortable1, #sortable2" ).sortable({ connectWith: ".connectedSortable" }).disableSelection(); });
http://jsfiddle.net/VVaqu/
Just add: float:left; to your li elements
float:left;
li
#sortable1 li, #sortable2 li { float:left; /*other styles...*/ }
Another solution if you cannot use float:
#sortable1 li, #sortable2 li{ display: inline-block; vertical-align: top; }
Vertical alignment is important: top.
Source: https://habr.com/ru/post/1447621/More articles:odbc_exec vs odbc_excute - phpIF NOT EXISTING IN PLSQL function - oracleReplace letters with encrypted texts - rWhy does HttpsURLConnection.getServerCertificates () return different results in Java6 vs Java7? - javaFinding a match between optional tokens? - regexIs there a short way to change the DateTime to "today" but save the previous saved time? - phpfunctional link instead of function body - in a loop (with argument) - javascriptMarshalling structure containing int and int [] from C # to C ++ - c ++python / django for loop and list attributes - pythonReturning model instances for raw sql using Ruby Sequel - ruby | fooobar.comAll Articles