I have created an input that creates divs to use as menu items. These divs are draggable, constrained to the parent div, and movement limited by a 40px at a time.
I need to ensure that when I drag a div, it can only be dragged to 40px past the div above it so the div above it acts as a parent div. For instance the first div it creates should not be draggable at all because it has no parent above it
The fiddle is here, http://jsfiddle.net/clintongreen/BMX4J/
Thanks
This plugin, http://mjsarfatti.com/sandbox/nestedSortable/ suggested by @enloz did the trick.