ducksboard / gridster.js

gridster.js is a jQuery plugin that makes building intuitive draggable layouts from elements spanning multiple columns
http://gridster.net/
MIT License
6.03k stars 1.2k forks source link

How to move gridster item pragmatically #256

Open imgen opened 10 years ago

imgen commented 10 years ago

I am using gridster to build a reorderable list, I want to know if there is a way to move one item from its position to the end and have other items to move up one position pragmatically with animation and all that?

smajl commented 10 years ago

You maybe meant "programmatically"?

Try to look into functions move_widget_down, move_widget_to and move_widget_up + with help of function e.g. for_each_widget_above. You can find them in source.

joshua-golub commented 9 years ago

I figured out how to do this. See Issue 20.

oceangravity commented 9 years ago

Hi guys,

try this:

gridster.mutate_widget_in_gridmap($("[data-row='1']"), { col: 7, row: 1, size_x: 6, size_y: 1 }, { col: 6, row: 1, size_x: 7, size_y: 1 });

You can, resize and move!

Juan Carlos RIATeam