I have script fancybox like this
$.fancybox.open({
href : '<?= site_url('sell_split/popup_qty/') ?>'+url_param,
type : 'ajax',
afterShow: popup_focus_qty,
afterClose: console.log('test')
});
As you can see, there is afterClose
event. But it seems when i try this script the afterClose
event is happened first and then GET
process.
This is not what i want.
What i want to do is, the event afterClose
is happening if the visitor closed FancyBox Window.
Is this an error from FancyBox plugin or the my code is wrong?
i found the answer myself, it should written like this
$.fancybox.open({
href : '<?= site_url('sell_split/popup_qty/') ?>'+url_param,
type : 'ajax',
afterShow: popup_focus_qty,
afterClose: function(){
console.log('test')
}
});
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