Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A different kind of jquery sortable

I have elements of different sizes that are arranged somewhat acording to a grid (like in the image below) and I want to drag and drop properly those elements. Is there a plugin that would do that? Sortable does not do it properly...

EDIT: By "properly" I mean it should act normal (meaning if I drag and drop the big one on the right it should rearrange inteligently). Maybe I just need to see one that does what I want and I'll make it do stuff "properly"

sortable grid

EDIT: If you move the big block on the right (how it should look like).

sortable grid 2

EDIT: I just want a way to rearrange a grid-like layout like this one. I can accept other ideas..

like image 987
Ciprian Mocanu Avatar asked Mar 31 '11 13:03

Ciprian Mocanu


People also ask

What is jquery sortable?

jQueryUI sortable() method is used to re-order elements in the list or grid form, by using the mouse. The sorting ability of this method is based on an operation string passed as the first parameter.

How to use sortable function in jQuery?

Enable a group of DOM elements to be sortable. Click on and drag an element to a new spot within the list, and the other items will adjust to fit. By default, sortable items share draggable properties.

What is sortable js?

Sortable JS is a Javascript library that enables you to sort lists by dragging and dropping list items. It also supports Javascript frameworks such as Meteor, AngularJS, React, Vue and Ember.


1 Answers

At Ducksboard we just launched gridster.js, a jQuery plugin that makes possible to build draggable layouts from elements spanning multiple columns. A live demo can be seen at gridster.net.

We are using it to arrange widgets of differents sizes in our dashboards. Hope you like!

like image 137
vieron Avatar answered Oct 12 '22 21:10

vieron