Search code examples
javascriptjqueryhtmlinternet-explorer-9zooming

Image magnifier issue on IE9 cloud zoom plugin extension for joomla


I have been using a plugin for joomla name cloud zoom, it's a plugin that provides our gallery the capability to create an image magnify effect when you hover over the large image on this link http://intangible-logic.com/amclassic/en/products/road-wheels/road-tubeless it works perfectly on almost all browser but in IE9 the issue is it could not able to view the full image when you move the cursor to the right side of the image it would not able to move to the edge of it same when you move it down. I think that this was a javascript issue but don't know where to begin with.


Solution

  • after a few hours of tracing the code I just found the problem:

    somewhere around line 277 of the file named cloud-zoom.1.0.2.js you'll find this code:

    cw = (sImg.outerWidth() / zoomImage.width) * zoomDiv.width();
    

    the line for the zoomDiv.width() is returning the wrong value but this only occurs on IE9 browser so what I did is update this code to solve the problem:

    cw = (sImg.outerWidth() / zoomImage.width) * sImg.outerWidth();
    

    not sure how this would affect the way the plugin works but somehow it resolves our problem in IE9 and works perfectly with all the other browsers as well. I hope this would help anyone who encounters the same issue as I do.