我安排了几次这样的活动:
$( #window-overlay ).on( click , overlayClickHandler);
$clickedObj.on( click , overlayClickHandler);
是否有一种简单的方法可以让我点击其中一种东西, 点击事件会被从另外一种东西中删除? 从 window-overlay
中删除它就足够简单了, 但$kickedObj 是 if
块内的一个变量, 所以以后可能很难弄清楚操作者被绑定的对象 。
我安排了几次这样的活动:
$( #window-overlay ).on( click , overlayClickHandler);
$clickedObj.on( click , overlayClickHandler);
是否有一种简单的方法可以让我点击其中一种东西, 点击事件会被从另外一种东西中删除? 从 window-overlay
中删除它就足够简单了, 但$kickedObj 是 if
块内的一个变量, 所以以后可能很难弄清楚操作者被绑定的对象 。
维护您想要为事件卸载的jquery 对象的数组, 并根据您的条件, 您可以通过数组, 并卸载所需的 jquery 对象... 您可以使用整齐的json 结构作为数组值来帮助您区分不同的捆绑事件 。 类似的东西 。
{
eventType: "click",
category: "myCategory1",
object: jqueryObject //or store the selector if you want to keep a low memory footprint..
}
类别基本上用于分组相关事件,所以您只需解开必需的分类。
我不知道是否有更容易的替代办法,但这是一种办法,至少比找到所有受事件约束的控制措施要好
The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...
How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.
I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...
I have a div <div id="masterdiv"> which has several child <div>s. Example: <div id="masterdiv"> <div id="childdiv1" /> <div id="childdiv2" /> <div id="...
I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.
I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...
Ok, I m stumped. Basically, this script works fine in FF, but not in IE (6,7 or 8) - in which it returns an "Object doesn t support this property or method" error. Any ideas?: function ...
What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...