I created a custom jQuery function to implement image zoom functionality. The code starts by hiding all images and ends by zooming the current image. In between, there is logic written to display the image in the center of the screen. However, the code is not working as expected. Can anyone offer assistance?
$("img").animate({opacity: "0.001", left: '0px'})
var imgPosX = ( $(window).width() - $("this").width() )/2;
var imgPosY = ( $(window).height() - $("this").height() )/2;
$(this).css({"top": imgPosY+"px", "left": imgPosX+"px"});
$(this).animate({opacity:"1", zoom: '150%'}, 'medium');},