Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8906601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:41:55+00:00 2026-06-15T02:41:55+00:00

I have the following code with CSS Animations running on the .in and .out

  • 0

I have the following code with CSS Animations running on the .in and .out classes.
My problem is that the Dialog is closing instantly and you don’t see the close animation happen at all. So I need a delay of ~500ms before closing the dialog;

$.extend( $.ui.dialog.prototype.options, { 
    modal: true, 
    open: function() { 
        $(this).parents('.ui-dialog').removeClass('out').addClass('in'); 
    }
});

$confirm.dialog({

    buttons: {

        "ok": {
            text:'Ok',
            click: function() { $(this).dialog('close'); }
        },

        "cancel": {
            text:'Cancel',
            click: function() { $(this).dialog('close'); }
        }
    },

    beforeClose: function(event, ui) {

        $('.ui-dialog').removeClass('in').addClass('out');

    }

}).dialog('widget').appendTo('.dialogWrapper');

I tried adding return false into the beforeClose, and then manually calling the .dialog('close') function but that just runs an infinite loop, and hiding the dialog manually seems to be wasted code (not to mention the overlay for the dialog would need to be removed, also)

I’d appreciate any help on the matter.

Si.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:41:56+00:00Added an answer on June 15, 2026 at 2:41 am

    I decided to run this and test it out, here’s the code you’ll need, it’s a lot slicker too:

    <script type="text/javascript">
        function showDialog() {
            $('#myDialog').on("dialogbeforeclose", function (event, ui) { });
            $('#myDialog').dialog({
                beforeClose: function myCloseDialog() {
                    alert('Closing Dialog Now...');
                }
            });
        }
    
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following CSS code, and my problem is that my nav bar
I have the following code CSS select.select { color:#FFFFFF; height: 15px; width: 105px; background:#996633
I have the following css code h1, h2, h3, h4 { color: #333; font-size:
I have the following CSS code being used for centering an <img> tag .img
I have the following css code. button.png is image where 3 button states are
I have the following CSS code .editable:before { content: url(../images/icons/icon1.png); padding-right:5px; } this is
I have the following html/css code . When I have the screen resolution to
Say I have the following code: <span>Hello world!</span> And the following CSS: span{ color:red;
i have the following code: <p class=more><a href=/stories class=more>Read more</a></p> and CSS: a.more, a.back
I have the following html and css code: <!DOCTYPE HTML> <html> <head> </head> <body>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.