bind a jquery function to fancybox .close() event

*Update: *
Please take a note of @mathoiland’s answer, “It looks like Fancybox 2 deprecated the onClosed callback. It now uses afterClose.” if you are using FancyBox 2.x

Pass the onClosed option to the fancybox function.

i.e:

$("<YOUR-SELECTOR>").fancybox({
  onClosed: function() {
    $('#sub_cont').hide(250, function() {
    $('#IDsearchform input').val('');
    });
  })
});

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)