Here is my code for fancybox iframe
<script type="text/javascript">
$(document).ready(function () {
$('.fancybox').fancybox();
$("#popup").fancybox({
fitToView: false,
autoSize: false,
autoDimensions: false,
title: "Item Details",
width: 965,
height: 525,
padding: 0,
helpers: {
title: {
type: 'float'
},
overlay: {
css: {
'background': 'rgba(238,238,238,0.85)'
}
}
},
'transitionIn': 'elastic',
'transitionOut': 'elastic',
onClosed: function () {
alert('Hi');
}
});
});
</script>
I want to handle iframe close event, but the above code is not working.
Please let me know where am I going wrong Please.
Thanks.
I assume that you are using fancybox v2.x because the API options in your code … if so
onClosedis not a valid option for this version but for v1.3.x.You have to use
afterCloseinstead :BTW, neither
transitionInortransitionOutare valid v2.x API options, check the documentation for the valid options for v2.x