Activity Stream
48,167 MEMBERS
62800 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 6 of 6
  1.     
    #1
    Member
    Website's:
    innovative-coding.com wolfs-rain.org wolfsrain.org infothread.org

    Default mouse over img script

    anyone got a script for when you mouse over a link (<A>) or an img it will show a larger version of it in a popup, but not full size. I dont want the img being larger than teh screen and going off screen.. kinda like how 4chanX expands the img when you hover over it and it follows the cursor..if the image is too large its resized and it never goes off screen

    I currently have a script, but it does what I dont want. If the image is on the right side and you hover over it, it will expand to the right and you cant see the image. You also can only view the fullsize image. So if the image is 2000x2500 -- youll miss half the image because its off screen.

    jQuery prefered

    Ive tried damn near everything.


    any help is appreciated


    ---------- Post added at 11:13 PM ---------- Previous post was at 10:25 PM ----------

    If noone has a script for that. Can you help me modify my existing code so it doesnt load the image offscreen

    __Doc_ Reviewed by __Doc_ on . mouse over img script anyone got a script for when you mouse over a link (<A>) or an img it will show a larger version of it in a popup, but not full size. I dont want the img being larger than teh screen and going off screen.. kinda like how 4chanX expands the img when you hover over it and it follows the cursor..if the image is too large its resized and it never goes off screen I currently have a script, but it does what I dont want. If the image is on the right side and you hover over it, it will expand to the Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Respected Member
    Lightbox is one. Highslide is another.

  4.     
    #3
    Member
    Website's:
    innovative-coding.com wolfs-rain.org wolfsrain.org infothread.org
    Don't want lightbox or any gallery script

    Just simple img pop up next to the mouse

    thanks for the reply!!

  5.     
    #4
    Respected Member
    I guess you just want to pop a window with the largest width and length without going outside browser size.
    Code: 
    <html>
    <head>
    <script language='JavaScript'> 
     function getImgSize(imgSrc)
     {
    		 var hp = 0.00; 
    		 var wp = 0.00; 
    		 var pct = 0.00;
    		 var newImg = new Image();
    		 newImg.src = imgSrc;
    		 if (newImg.height > self.innerHeight) {hp=self.innerHeight/newImg.height;} 
    		 if (newImg.width > self.innerWidth)   {wp=self.innerWidth/newImg.width;}
    		 if (hp<wp) {pct = hp; } else { pct = wp; } if (pct == 0) { pct =100;}
    		 my_window = window.open("", "mywindow1", "status=1,width="+hp*newImg.width+",height="+hp*newImg.height);
    		 my_window.document.write('<img  height='+hp*newImg.height+' width='+hp*newImg.width+'  src="'+newImg.src+'" >');
     }
    </script>
    	</head>
    <body>
     <IMG id='demoImg' width=15% src="yourImage.jpg" onMouseOver="getImgSize(document.getElementById('demoImg').src);"><br>	
    <div width=100%>	
    </div>
    </body></html>

  6.     
    #5
    Member
    Website's:
    innovative-coding.com wolfs-rain.org wolfsrain.org infothread.org
    Bump

    Anyone here have experience with jQuery and can help me fix my code? I can pm you my jsfiddle

  7.     
    #6
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    why you don't post the link here ....

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. What Is your Mouse Clicking Speed
    By nasavsisro in forum Useful Sites
    Replies: 52
    Last Post: 31st Dec 2011, 06:09 AM
  2. What mouse do you use?
    By DuckBre in forum General Discussion
    Replies: 26
    Last Post: 12th Sep 2011, 12:39 PM
  3. Track pad vs Mouse
    By thecompgame in forum Polling Plaza
    Replies: 12
    Last Post: 29th Jul 2011, 06:33 PM
  4. Mouse Vs Keyboard
    By Jazzyb in forum Polling Plaza
    Replies: 17
    Last Post: 27th Nov 2010, 02:28 AM
  5. Which mouse to buy?
    By uzonigor in forum General Discussion
    Replies: 18
    Last Post: 18th Jul 2010, 05:53 AM

Tags for this Thread

BE SOCIAL