I would like to disable my facebox links until the page has completely loaded reason being, when I click on a facebox link before the page loads completely, the page loads a different page instead of the modal! What is the best way to fix this problem?
This is facebox script
<link href="facebox.css" media="screen" rel="stylesheet" type="text/css"/>
<script src="facebox.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loading_image : 'images/ajax-loading.gif',
close_image : 'images/fb_closelabel.png'
})
})
</script>
this is html
<a href="linktosomewhere.php" rel="facebox">Click to goto somewhere</a>
Just figured out a decent workaround. Depending on the content you're dealing with, a simple solution is to set display:none to the tag in question, then simply add the following code to your js.
and in your html:
A few months late, but hope this helps someone!