jQuery UI Library Stationary Items when dragging


Example

This example uses a class on the placeholder to turn it into a line and make it take up no room.

HTML

<div id="sortable">
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
</div>

JS

$("#sortable").sortable({
    placeholder: 'placeholder',
    helper: 'clone',
    start: function(event, ui){
        ui.item.show();
    }
});

CSS

#sortable div{
  background-color: #f00;
  width: 50px;
  height: 50px;
  margin: 10px;
  padding: 0px;
}
#sortable div.placeholder{
  height: 4px;
  margin: -7px 10px;
}