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:
$("a").unbind('fancybox').unbind('click');
Testing code: http://jsfiddle.net/martinba/yy3cw/2/
I use current version 2.1.4.
In order to unbind fancybox you have to unbind events under fb-start
namespace from document
:
$(document).unbind('click.fb-start');
Though, I don't know why developer made it so unobvious.
http://jsfiddle.net/dfsq/yy3cw/16/
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