assignment of id to variable on click