开发者

How to unbind Facebox?

开发者 https://www.devze.com 2023-02-17 02:52 出处:网络
I have an anchor like below <a href=\'...\' rel=\'facebox\'>..</a> and use facebox like $(\'#...\').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

$('#..开发者_C百科').unbind('facebox'); 
$('#..').unbind('keydown.facebox');

But both don't work.

Who can help me out... ?

Thanks.


Try:

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

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


Have you tried

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

(notice the .) this will unbind all events in the facebox namespace. (which is what the facebox uses)

0

精彩评论

暂无评论...
验证码 换一张
取 消