Update to click event listener (from window click, to jQuery's delegated on event listener)