I'm having an issue with fancybox when I try and load an html page.
I have a link
<a href="testPage.html" id="chal">Load testPage.html in fancybox</a>
and then the js that binds it to fancybox
$('a#chal').fancybox({
padding: 0,
margin: 0,
showCloseButton: true,
scrolling: 'no',
opacity: 0.5,
centerOnScroll:true
});
In chrome, firefox, and IE the fancybox loads fine. But in Safari, the html loads without the accompanying css or js. If I add something like this, then it works:
$('a#chal').click(function() {
$("head").append($("<link rel='stylesheet' href='blah.css' media='screen' />");
});
Then it works just fine but it seems like the solution above is not the way to go about it. Is there any other way to do this? Thanks.