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

  • SEARCH
  • Home
  • 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 6937203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:19:59+00:00 2026-05-27T12:19:59+00:00

I have this debug tool that used Jquery UIs dialog to display some information.

  • 0

I have this debug tool that used Jquery UIs dialog to display some information. Just for fun, I want to have a different animation for each time box is hidden (closed with the button, etc).

$('.devTool .devToolContent').dialog({
    autoOpen: false,
    modal: true,
    hide: "explode",
    width:'auto',
    dialogClass: 'devToolDialog',
    resizable: true,
    open: function(event, ui) {
        // Make the area outside the box clickable. When cliked the dialog box closes.
        $('.ui-widget-overlay').bind('click', function () { $(this).siblings('.ui-dialog').find('.ui-dialog-content').dialog('close'); });
    }
});

As you can see, I have the explode animation right now. Some of the other animations are fade and slide (see list on Jquery UI documentation – Hide effects).

  • 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-05-27T12:20:00+00:00Added an answer on May 27, 2026 at 12:20 pm

    Try this:

    var transitions = ["explode", "fade", "slide"]
    
    $('.devTool .devToolContent').dialog({
        autoOpen: false,
        modal: true,
        hide: transitions[randomFromTo(0, transitions.length - 1)],
        width:'auto',
        dialogClass: 'devToolDialog',
        resizable: true,
        open: function(event, ui) {
            // Make the area outside the box clickable. When cliked the dialog box closes.
            $('.ui-widget-overlay').bind('click', function () { $(this).siblings('.ui-dialog').find('.ui-dialog-content').dialog('close'); });
        }
    });
    
    function randomFromTo(from, to) {
        return Math.floor(Math.random() * (to - from + 1) + from);
    }
    

    It defines an array at the beginning which contains all the possible jQuery UI effects you’d like to choose. Then it picks a random one and sets it as the hide parameter for the dialog.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code in jQuery, that I want to reimplement with the prototype
I have this output when trying to debug Program received signal SIGSEGV, Segmentation fault
I am trying to debug a segfault, and I have this output from gdb:
I have this RewriteRule that works too well :-) RewriteRule ^([^/]*)/$ /script.html?id=$1 [L] The
I have an ASP.NET application that consumes a lot of memory. Therefore I want
I have a little problem. I have a tool that will likly have a
I'm looking at making a hardware debug tool that runs on the bare CPU
I have installed doxygen.dmg. I have used this link for reference: duckrowing I have
I'm looking to write a tool that aims to convert debug symbols of one
I have a header file like this: #ifndef __GEN_NOTE_MARKERS_TO_DEVELOPERS_HPP__ #define __GEN_NOTE_MARKERS_TO_DEVELOPERS_HPP__ #ifdef _DEBUG //

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.