6

I am using fancyBox v2.0.4 ...

Well this should be simple, however it does not work in my case... I simply want to run a callback function when the fancybox is closed...

$('a#stpa_announcement_details_open').fancybox({
    'onCleanup': function() { alert('test') },
    'hideOnContentClick': true
});

does not work

$('a#stpa_announcement_details_open').fancybox({
    'onClosed': function() { alert('test') },
    'hideOnContentClick': true
});

does not work

0

3 Answers 3

17

You are using options from older versions, so it would be like -

$('a#stpa_announcement_details_open').fancybox({
    'beforeClose': function() { alert('test') },
    'closeClick': true
});

You can find these options at http://fancyapps.com/fancybox/#docs

0
1
 $('a#stpa_announcement_details_open').fancybox({
   'afterClose': function() {
                               alert('test') 
                             }
  });

Hope it works..

0

use beforeClose or afterClose. Find the API documentation under the Callbacks tab here http://fancyapps.com/fancybox/#docs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.