In firefox, if the user clicks the below link before the page loads, it opens in a new window instead of in the thickbox dialog. Any way to prevent this?
I cannot make this happen on IE/safari
Thickbox works by setting a class “thickbox” on a link:
<a href="http://someurl.com" class="thickbox none new" title="Open">Open</a>
Then in thickbox
//on page load call tb_init
$(document).ready(function(){
tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
imgLoader = new Image();// preload image
imgLoader.src = tb_pathToImage;
});
Make sure you are loading the various script resources in the correct order. For example
This can be in either the
<head>or preferably, just before the closing</body>tag.As Pointy, err, pointed out, Thickbox is no longer under active development. You might consider one of the following alternatives