I have build a plugin for Joomla with fancyBox v2.1.5.
It functions good in every browser, except in IE7. Not a big issue, but this is my portfolio site to get work, so I want it to function in this old browser also.
I have an iframe I the pop up with a form in from a contact plugin (Responsive Contact Form), and the form will not show up, but the google captcha facility is there.
The form is there if I open the page in a new browser window.
I have tried to set iframe: { preload: false } then it functions, the form is there, but then "Fit To View" for fancybox do not function in Opera and IE, the height went wrong.
Greatfull for any help!
This is my Fancybox code:
<script type="text/javascript">
jQuery(window).on('load', function() {
new JCaption('img.caption');
});
(function($){
$(document).ready(function(){$('.item-page').find('a:has(img)').addClass('fancyboxlink');$('.fancyboxlink').addClass('hiddenclass'); $('.hiddenclass:first').addClass('firstfancybox');$('a.fancyboxlink').attr('rel','gallery');
$('a.fancyboxlink').fancybox({
'type':'iframe',
scrolling: 'auto',
fitToView: true,
autoResize: false,
centerOnScroll: true,
width: 940,
height: 'auto',
scrollOutside: true,
autoCenter: true,
titlePossition: 'outside',
afterShow: function() {
if($('.fancybox-iframe').length > 0) {
this.width = $('.fancybox- iframe').contents().find('html').width();
this.height = $('.fancybox-iframe').contents().find('html').height();
$.fancybox.update();
}
},
'afterClose': function() {
$('#fancybox-inner').empty();
}
});
});
})(jQuery);
</script>