views:

138

answers:

1

I am using the jQuery plugin Colorbox for some images on This page.

If you look at the main product image in the center, right below it are some little polaroid-looking thumbnails. If you click on one it pops up an image using Colorbox

If you make your browser window about 800px wide (the width of the page content) the popup will be centered. However as you widen the browser window the popup will drift more and more to the right (not staying in center).

Anyone know how I can fix this?

A: 

Well I was able to fix it by changing this line:

posLeft = Math.max(document.documentElement.clientWidth - settings.w - loadedWidth - interfaceWidth,0)/2 + $window.scrollLeft();

to

posLeft = Math.max(800 - settings.w - loadedWidth - interfaceWidth,0)/2 + $window.scrollLeft();

in jquery.colorbox.js

However a solution that doesn't envolve changing the source of the plugin and making it less dynamic would be ideal.

John Isaacks