Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to unbind fancybox from a selector

I have an anchor link with a class which identifies it to be called on fancybox. example:

<a class="group">some code here</a>

Fancybox binding:

$('.group').fancybox();

If I want to unbind fancybox with elements selected by $('.group'), how should I do that? I have tried removeClass('group') but its not working.

like image 775
Ranoy Avatar asked Dec 29 '11 15:12

Ranoy


People also ask

How do I open Fancybox on button click?

jQuery(document). ready(function($) { $('button'). on('click', function() { $. fancybox(); }); });

How do I know if fancybox is loaded?

Here is the code: if ($('div#fancybox-frame:empty'). length >0) { alert('it is empty'); $.

What is Fancybox in HTML?

fancybox is designed to display images, video, iframes and any HTML content. For your convenience, there is a built in support for inline content and ajax. Images.


2 Answers

$('.group').unbind('click.fb')
like image 68
lafeber Avatar answered Oct 19 '22 00:10

lafeber


You can add class "nofancybox" to link and this link will be ignored

like image 39
Pavel Kukla Avatar answered Oct 19 '22 00:10

Pavel Kukla