Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2006
    Location
    UK
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Giving minus value in code

    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:

    Code:
    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

  • #2
    Regular Coder Apothem's Avatar
    Join Date
    Mar 2008
    Posts
    380
    Thanks
    36
    Thanked 25 Times in 25 Posts
    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.

  • Users who have thanked Apothem for this post:

    pumpkin (12-21-2011)

  • #3
    New to the CF scene
    Join Date
    Oct 2006
    Location
    UK
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Strange, giving the x value a positive number does move it to the left! This was perfect in the end:

    Code:
    xOffset = 450;
    yOffset = -400;
    Thanks!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •