Refactor to drag n drop with jQuery