Jump to content

thickbox and jquery


dflow

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>

Link to comment
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.