[英]how to remove an event handler in jquery?
I have to display a qTip when I click on the div
.当我点击
div
时,我必须显示一个 qTip 。 But,that qTip is displayed when the mouse enters the div
.但是,当鼠标进入
div
时会显示 qTip 。
I did not add any event except click
.除了
click
之外,我没有添加任何事件。
On the first time the mouse enters it is not working, but the mouse over will activate after I click the div
the first time.第一次鼠标进入时它不起作用,但是在我第一次单击
div
后鼠标悬停会激活。
After the first click on the div
, if the mouse enters into the div that qTip is displayed, but I don't want to display the qTip while the mouse enters the div.第一次点击
div
,如果鼠标进入显示 qTip 的 div,但我不想在鼠标进入 div 时显示 qTip。
My code is:我的代码是:
.on('click', '.selectionOptions', function(){
$(this).qtip({
id: 'selection_delete',
style: {
classes: 'ui-component-config selectionOpt',
tip:false
},
content:{
text:'HAI'
},
show: {
event:'click'
}
},
hide: {
when:'unfocus'
}
)};
)};
$( "#foo" ).unbind();
or或者
$( ".selectionOptions" ).click(function() {
$( "body" )
.off( "click", $(this), flash )
.find( "#theone" )
.text( "Does nothing..." );
});
try this尝试这个
它应该是以下内容:
$(".element").off();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.