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 7159969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:19:11+00:00 2026-05-28T13:19:11+00:00

some how i manage to have jquery transfer effect working with jquery dialog but

  • 0

some how i manage to have jquery transfer effect working with jquery dialog but there is one glitch. here is the url http://jsbin.com/amicev/2 please go and see. the glitch is when dialog appear then dialog appear before the transfer effect complete. i want that dialog should appear after transfer effect complete. if i try to write the code for showing dialog after the completion of transfer effect.

so here is my full code

<html>
<head>
<link class="jsbin" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
article, aside, figure, footer, header, hgroup, 
menu, nav, section { display: block; }
.ui-effects-transfer {
border: 2px dotted grey;
}
</style>
</head>
<body>
<input type="button" id="btnToggle" value="Toggle Dialog">
<div id="dialog" title="Basic dialog" style="display: none">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
</body>
</html>

 jQuery(function($) {
// Set up the dialog, don't show it yet
// Note the effects, they tie up with the
// transfer effect we do later.
 $("#dialog").dialog({
 show: {
  effect:   "fade",
  duration: 1000
},
hide: {
  effect:   "fade",
  duration: 500
},
autoOpen: false
});

// Hook up the button to toggle showing/hiding
// the dialog
$("#btnToggle").click(function() {
var dlg = $("#dialog");

// Show or hide?
if (dlg.is(":visible")) {
  // Hide: Kick off the transfer effect and close the
  // dialog. The transfer will run simultaneously
  // with the fade we configured above
  dlg.effect("transfer", {
    to: "#btnToggle",
    className: "ui-effects-transfer",
    duration: 500
  }).dialog("close");
 }
 else {
  // Show: Show the dialog, then kick off a transfer
  // effect transferring the button to the dialog's
  // widget. Again the transfer and fade run simultaneously
  // and so work together.
  dlg.dialog("open");
  $(this).effect("transfer", {
    to: dlg.dialog("widget"),
    className: "ui-effects-transfer"
  }, 500);
}
return false;
});
});

if i try to modify this line to appear dialog after transfer effect complete then output is getting distorted.

     $(this).effect("transfer", {
     to: dlg.dialog("widget"),
     className: "ui-effects-transfer"
     }, 500,function() { dlg.dialog("open"); });

so i just want to show dialog after completion of transfer effect. so tell me what i need to change in the code as a result output should not distorted.

thanks

  • 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-28T13:19:11+00:00Added an answer on May 28, 2026 at 1:19 pm

    As you have seen firsthand, you cannot reliably trigger the transfer effect if the dialog widget is hidden through display: none; (since the widget’s dimensions cannot be measured under these conditions).

    However, you can set its visibility property to hidden, trigger the effect, then set the property back to visible. This gives good results in my tests:

      dlg.dialog("open").dialog("widget").css("visibility", "hidden");
      $(this).effect("transfer", {
          to: dlg.dialog("widget"),
          className: "ui-effects-transfer"
      }, 500, function() {
          dlg.dialog("widget").css("visibility", "visible");
      });
    

    You will find an updated JS Bin here.

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

Sidebar

Related Questions

I have written some JavaScript and jQuery code that accepts only numeric input in
I'm terrible at javascript and css, but I did manage to implement the Jquery
I know the correct way to manage JQuery.dialog is to initialize with: $(#dialog).dialog({ autoOpen:
I'm currently working on a website that you'll find here: http://steadfastdesignfirm.com/rgw/ . I used
i'have a js client with JQuery, this js call a page (GET HTTP) and
in my application.html, i have this inside: ... <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js></script> ... in my _post.html,
I get some bug trying to manage table data (with the available languages). Here
So far I have managed to write some code that should print the source
So I have a uipicker view, that I have managed to load some data
At work I work closely with MS-Office. I have managed to generate some scripts

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.