I am trying to create a mesh grid that can be rebuilt. Tiles of different sizes. This is how far I got.
http://jsfiddle.net/psivadasan/dMtRs/
How to prevent rearrangement of tiles outside the gray area? I do not want this to happen: http://i.imgur.com/0JAfY.png
Appreciate any help.
Just use the parameter containment: this will stop the movement of elements outside.
containment
$('ul').sortable( "option", "containment", 'parent' );
http://jsfiddle.net/dazefs/dMtRs/7/