I have a jquery fancybox and I call it from url with #
$(document).ready(function() {
$('.fancybox').fancybox({
openEffect : 'elastic',
closeEffect: 'elastic',
'type' : 'iframe',
'overlayOpacity' : 0.1,
'overlayShow' : false,
'centerOnScroll' : true,
'autoSize': false,
'width' : 990,
'height' : 780,
});
$('.contact').fancybox({
openEffect : 'elastic',
closeEffect: 'elastic',
});
});
var thisHash = window.location.hash;
$(document).ready(function() {
if(window.location.hash) {
$(thisHash).fancybox().trigger('click');
}
$('.contact').fancybox();
}); // ready
I have managed to call it from url with # but the div containing the link for the fancy box becomes hidden when calling it from url. If you open the page without # calling it the div is shown(not hidden). Any ideas?