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.
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 )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.