Move the click attachment until after the elements have all been created and rendered