我很想知道是否有可能在<代码>.animate()活动上增加两个或两个以上“代码>的功能,例如:
.animate(properties [, duration] [, easing] [, complete][, complete][, complete])
因为我不想有一件事。 我想以不同的<条码>完整条码>功能将他们分开!
这是可能的吗?
我很想知道是否有可能在<代码>.animate()活动上增加两个或两个以上“代码>的功能,例如:
.animate(properties [, duration] [, easing] [, complete][, complete][, complete])
因为我不想有一件事。 我想以不同的<条码>完整条码>功能将他们分开!
这是可能的吗?
页: 1
.animate(properties, function(){
callback1();
callback2();
});
如果退约1和退约2是职能。
你可以把你的反馈职能变成一个单一功能(请注意:)。 为了在最初的回击中说明这些职能:
$("selector").animate(properties, duration, easing, function() {
complete1.apply(this);
complete2.apply(this);
complete3.apply(this);
});
或者,你可以使用新的设施,将所有你的呼吁汇入一个物体:
var animateCallbacks = $.Callbacks();
animateCallbacks.add([complete1, complete2, complete3]);
$("selector").animate(properties, duration, easing, function() {
animateCallbacks.fireWith(this);
});
No is not possible :-). The quickly way is call two function in the callback.
就我所知,的文件仅提及一项背书功能。 它可以努力使用不止一种手段,但这种行为也可以在没有通知的情况下改变,因此,你不得使用。
你们只能以匿名身份行事。 例:
$( .moving ).animate({ height: 20px }, function() {
callback1();
callback2();
callback3();
});
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: &...