English 中文(简体)
在对话结束时,我会如何开展两次活动?
原标题:how would I perform two events when a dialog is closed?

在 j子被点击时,我谨采取两项行动。 我有两点。 在我结束方言时,我要iv倒,iv倒2。

迄今为止,我已设法使第1次滑坡升级。 因此,在四舍五入后,我能把四分五位的代码放在哪里?

这里是法典

$( #unlock ).click(function(){

    $( #dialog_content ).dialog({

        modal: true , resizable: false,

        close: function(event, ui) { $( #div1 ).slideUp();}

    });

});
最佳回答

幻灯塔

close: function(event, ui) {
  $( #div1 ).slideUp(function() {
    $( #div2 ).slideDown();
  });
};
问题回答

引证:

$( #unlock ).click(function(){

$( #dialog_content ).dialog({

    modal: true , resizable: false,

    close: function(event, ui) {
$( #div1 ).slideUp( function(){$( #div2 ).slideDown();});

}

});

});
 (function(){

      $("#unlock").on( "click", function() {
        $("#divone").slideUp();

      $("#divone").promise().done(function() {
         $( "#divtwo" ).slideDown();
      });

  });

})();

你们也可以使用(promise)手段,确保一定类型的受收集、查询或不收集约束的行动都已完成。 也许没有什么超技能,而只是另一种选择。





相关问题
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.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签