English 中文(简体)
具备两项完整的职能?
原标题:.animate() with two complete functions?
  • 时间:2011-11-14 07:31:48
  •  标签:
  • jquery

我很想知道是否有可能在<代码>.animate()活动上增加两个或两个以上“代码>的功能,例如:

.animate(properties [, duration] [, easing] [, complete][, complete][, complete])

因为我不想有一件事。 我想以不同的<条码>完整功能将他们分开!

这是可能的吗?

最佳回答

页: 1

.animate(properties, function(){
    callback1();
    callback2();
});

如果退约1和退约2是职能。

问题回答

No is not possible :-). The quickly way is call two function in the callback.

就我所知,的文件仅提及一项背书功能。 它可以努力使用不止一种手段,但这种行为也可以在没有通知的情况下改变,因此,你不得使用。

你们只能以匿名身份行事。 例:

 $( .moving ).animate({ height:  20px  }, function() {
   callback1();
   callback2();
   callback3();
 });




相关问题
getGridParam is not a function

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 )...

selected text in iframe

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.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

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.

jConfirm with this existing code

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"; } ...

Wrap text after particular symbol with jQuery

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: &...

热门标签