added click function for draggable tables