alt added to image overlay in js

The alt tag is fine with the images (normal state) but when you click on the image and the overlay is displayed, the image doesn't have an alt tag. I've solved the issue now. Kindly check. Thanks.