Search code examples
jqueryfacebox

How to unbind Facebox?


I have an anchor like below

<a href='...' rel='facebox'>..</a>

and use facebox like

$('#...').facebox();

But I need to unbind facebox() event dynamically, I tried the two ways as follows

$('#..').unbind('facebox'); 
$('#..').unbind('keydown.facebox');

But both don't work.

Who can help me out... ?

Thanks.


Solution

  • Try:

    $('#...').unbind('click.facebox');
    

    The source code indicates that this is the name of the actual click handler.