DRAG-AND-DROP.HTML

Implementing drag and drop functionality is not as simple as one would think. Besides having to do a boundary check on all the draggable layers, you also have to make sure that the right layer is selected when overlapping occurs.

By combining a subset of my DHTML API with my mouse events script, I created this minimalist drag and drop HTML sample. I use a similar script in My Little Word Puzzles.