嘿,我在一个元素上设置了一个切换事件,我希望在代码中的某处将其删除。
我怎样才能删除这个?
这是我的切换:
$('#album_cell'+currentCell).toggle(function() {
$('#album_cell'+currentCell).flip({
direction:'lr',
dontChangeColor: true,
content: captionPane
});
}, function() {
$('#album_cell'+currentCell).revertFlip();
});
翻转是我正在使用的插件,与问题无关。
我似乎无法使用类似的东西:
$('#album_cell'+currentCell).off('toggle');
那么我该如何禁用它呢?我可以将两个切换事件都设置为一些变量然后禁用它吗?