...

View Full Version : Giving minus value in code



pumpkin
12-21-2011, 09:59 AM
Hi

I'm using an image hover script so when you mouseover a thumbnail it displays a larger version of the image in a javascript/jquery nice image popup (not a popup window but like a floating image). It comes from the script here http://cssglobe.com/lab/tooltip/02/

The trouble is, I need the large image to display above and to the left of the thumbnail - not to the right and below. Looking in the js file I see these values:



this.imagePreview = function(){
/* CONFIG */

xOffset = 10;
yOffset = 30;

// these 2 variable determine popup's distance from the cursor
// you might want to adjust to get the right result


I've tried making these -500 and -500 but it just makes them like the negative value was not added (the large image goes down 500px).

So as I don't understand javascript code I'm thinking that is not the way to give a negative number?

Would appreciate any help please :thumbsup:

Apothem
12-21-2011, 10:29 AM
Have you tried placing the xOffset to a larger positive number? By larger, I do not mean 500 either. Try 20, then 30, then 40, etc.

pumpkin
12-21-2011, 10:41 AM
Strange, giving the x value a positive number does move it to the left! This was perfect in the end:



xOffset = 450;
yOffset = -400;

Thanks!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum