I can drag and drop draggable elements onto targets but need to compare the source div with the target div so that I can control where I drop the dragged element. The drag/drop functions identify the target divs but not the source divs.
I want to be able to compare as follows:
There are 32 target divs. Let the draggable element be on source div6.
It can be moved onto div2, div3, div10 or div11, so:-
if(div6 - targetdiv == -2 or -3 or 4 or 5) {return;} [to allow a valid drop]
else {return:false;} [to prevent invalid drop]
How can I identify the source div, please, to control my drag drops?