Added onclick event handler for fliping row/col tiles