Selecting the cookie name was impossible because the element got replaced on mouseup