@Bryce
In a normal scenario, fancybox has to wait for the document to be
ready (.ready() method)
the only way I can see to make it work the way you want it is to fire
fancybox as a function onclick. As any other function, you may need to
pass the parameters (at least the URL) so your link
<a class="fancybox" href="include/boxes/doLogin.php">Log in</a>
should look like now:
<a href="javascript:;" onclick="fancyboxMe('include/boxes/
doLogin.php')">Login</a>
- or with an absolute path whatever it works better
<a href="javascript:;" onclick="fancyboxMe('
http://www.gamemazing.com/
v5/include/boxes/doLogin.php')">Login</a>
notice that you call the function wheather the document is ready or
not and pass the url to it
so the script:
<script type="text/javascript">
function fancyboxMe(url) {
$.fancybox({
// your fancybox options here
'href' : url,
});
}
</script>
notice that I passed the url as parameter and set the option 'href' to
fancybox so it will know what to open.
In this way you can fire fancybox before the document is ready