I want to add a small function to move an element up/down/left/right.
How I can check in which direction an element (div span etc) can move at all?
For example, I have this code:
<div id="stop_here_container">
<div></div>
<div>
<div><div>
<div></div>
<div></div>
</div>
<div></div>
</div>
Now I must check in which direction every element could be moved (elements could be unlimited nested!). For example, to know this:
<div id="stop_here_container">
<div>I can move down</div>
<div>
<div>I can move up/down/right</div>
<div>I can move left/right/up/down</div>
<div>I can move up/down/left</div>
</div>
<div>I can move up</div>
</div>
After that, I can add a data.attr
or a class to every element, and go on with his.
Thanks for your help and suggestions