Updated click event to take care of checkbox state maintain after scrolling