Martin Martin - 1 year ago 633
Javascript Question

How to destroy Fancybox?

I'm trying to destroy Fancybox. I haven't found any method to do it in documentation. How to destroy it after it was initialized?

This doesn't work:


Testing code:

I use current version 2.1.4.

Answer Source

In order to unbind fancybox you have to unbind events under fb-start namespace from document:


Though, I don't know why developer made it so unobvious.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download