Use document.on(click) so that it updates as the DOM changes