jquery, safari & jqzoom plugin - issue with document.ready
I have a small issue with jQuery on Safari (Mac OSX 10.6) - the page loads fine under Firefox (Mac) and Internet Explorer (Win) but has to be refreshed to work properly in Safari...
http://7souls.co.uk/store/index.php?dispatch=products.view&product_id=29788
If you hover over the image it is meant to show a magnified version to the right hand side - which works on the first page load on all browser开发者_StackOverflow社区s except Safari on the Mac.
You have to refresh the page to get it to work under safari.
Any Ideas,
MM
this could be a wild stab in the dark, but i've had this sort of behaviour before, and found it was related to jquery and other javascript not playing nicely. you can try
jQuery.noConflict();
to see if that fixes your problem.
Correct me if I'm wrong, but it looks to me like the function is trying to add bindings to a DOM object that does not exist. The command reads:
$.runCart('C');
Your script attempts to add bindings to an object with this passed in name. Since there is no object 'C' in the document there will be no bindings made. I'm thinking you meant to use something more on the lines of:
$.runCart('#product_images_29788');
This properly identifies the object on the left side that contains your product image.
(I could be wrong here as it does appear that you may have modified the page to serve some other purpose since your original post.)
Make sure your image tag has a width value!
<img src="assets/images/name_of_image.jpg" alt="alt_title" width="200" />
This solved it for me. It's to do with the jqzoom script being run before the image has loaded so the width of the image can't be added to offset the zoomwindow.
精彩评论