refactor js and hide icons when dragging recipes