This is a demo of the jQuery UI .draggable() and .droppable() functions. The puzzle pieces will revert to the original location if dragged to the wrong spot. There is also a snap option so that the pieces snap into place.