Jump to content

Archived

This topic is now archived and is closed to further replies.

dflow

thickbox and jquery

Recommended Posts

 

 

anyone have this problem?

all the paths to the js and the css files are correct

when i press the link the loading image loads put nog=thing happens

 

here is the code:

<script type="text/javascript" src="http://localhost/jquery.js"></script>
<script type="text/javascript" src="http://localhost/thickbox.js"></script>

<style type="text/css" media="all">@import "http://localhost/thickbox.css";</style>

</head>

<body>
<a href="images/single.jpg" title="add a caption to title attribute / or leave blank" class="thickbox"><img src="images/single_t.jpg" alt="Single Image"/></a>


<a href="images/plant1.jpg" title="add a caption to title attribute / or leave blank" class="thickbox" rel="gallery-plants"><img src="images/plant1_t.jpg" alt="Plant 1" /></a> 
<a href="images/plant2.jpg" title="add a caption to title attribute / or leave blank" class="thickbox" rel="gallery-plants"><img src="images/plant2_t.jpg" alt="Plant 2" /></a> 
<a href="images/plant3.jpg" title="add a caption to title attribute / or leave blank" class="thickbox" rel="gallery-plants"><img src="images/plant3_t.jpg" alt="Plant 3" /></a> 
<a href="images/plant4.jpg" title="add a caption to title attribute / or leave blank" class="thickbox" rel="gallery-plants"><img src="images/plant4_t.jpg" alt="Plant 4" /></a>

</body>
</html>

Share this post


Link to post
Share on other sites

Do you have a page where this is working live?

Have you tried examining it with firebug?

Share this post


Link to post
Share on other sites

The code in thickbox.js http://vacation-tips.awardspace.info/thickbox.js

seems to have a typo or something...

		imgPreloader = new Image();
		imgPreloader.onload = function(){		///This should be closed somewhere, I can't find it
		imgPreloader.onload = null; //This should go before the line above.

		// Resizing large images - orginal by Christian Montoya edited by me.
		var pagesize = tb_getPageSize();
		var x = pagesize[0] - 150;
		var y = pagesize[1] - 150;
		var imageWidth = imgPreloader.width;
		var imageHeight = imgPreloader.height;
		if (imageWidth > x) {
			imageHeight = imageHeight * (x / imageWidth); 
			imageWidth = x; 
			if (imageHeight > y) { 
				imageWidth = imageWidth * (y / imageHeight); 
				imageHeight = y; 
			}
		} else if (imageHeight > y) { 
			imageWidth = imageWidth * (y / imageHeight); 
			imageHeight = y; 
			if (imageWidth > x) { 
				imageHeight = imageHeight * (x / imageWidth); 
				imageWidth = x;
			}
		}
		// End Resizing

Share this post


Link to post
Share on other sites

check your hyperlinks to the fullsize images. if i enter that directly into the urlbar of my browser I don't see a fullsized image

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.