I am trying to call a function on the load of the fancybox dialog(content loaded as iFrame) but call to the "callbackOnShow" is not working. Appreciate any help on this.
here's the code snippet:
jQuery:
$("#link1").fancybox({
'width': '50%',
'height': '50%',
'autoScale': false,
'transitionIn': 'none',
'transitionOut': 'none',
'type': 'iframe',
'callbackOnShow': function () {
alert("Hello");
}
});
HTML code which is shown in the fancybox:
<div>
<div class="signup">
<div id="test">
<a id="Log" class="but" href="#"><strong>Sign in</strong> </a>
</div>
</div>
</div>
I dont see the callbackOnShow @ http://fancybox.net/api ?
Which fancybox are you using ? can you add it to a fiddle ?
Fancybox provides onComplete option as it works fine when the show is completed.
Demo - http://jsfiddle.net/SrT4T/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With