Jquery sortable inline-block elements jumping

464
December 10, 2016, at 1:08 PM

I have the problem of jumping elements on sortable jquery function. They are inline-block width % widths.

I searched this problem up on stack but all I found was to use float:left;. I tried this but I still have a jump. Somehow the width is slightly increasing when you pick up the element causing it to push everything. Here is my jsfid

https://jsfiddle.net/143eh4gx/

Answer 1

You need to define a width for all LIs, don't use inline styling:

#visuals>li {
    float:left;
    display:inline-block;
    width: 20%;
}

Sortable plugin is using placeholder element which in your code as no width defined.

Rent Charter Buses Company
READ ALSO
Ajax Response is not defeined

Ajax Response is not defeined

I am quite green when it comes to AJAX and am trying to get an email address from an ASPNet code behind function

313
Customizing DT with fnRowCallback

Customizing DT with fnRowCallback

I tried to color a whole row inside my datatable with the fnRowCallback argument, the effect works but other DT functions wont work anymoreHere's a simple example:

556
JavaScript crashes randomly in FireFox

JavaScript crashes randomly in FireFox

I have a JS code, which more specifically deals with the generation of jQuery UI Dialogs, included in my pages as external file as <script src="js/dialogsjs"></script>

434