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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:19:10+00:00 2026-05-26T08:19:10+00:00

I know how to work with jQuery dialog, like below JQuery snippet $(#PMinfo).dialog({ autoOpen:

  • 0

I know how to work with jQuery dialog, like below

JQuery snippet

$("#PMinfo").dialog({

autoOpen: true,
height: 250,
width: 600,
modal: false,
draggable: false,
resizable: false,
close: function() {

var $this = $(this);

$this
    .dialog("widget")
    .effect("transfer", {

        to: "#smpb_info_btn",
        className: "ui-effects-transfer"

    }, 500, function() {

        $this.remove();

    });

}}

But I want to achieve the transfer effect like Dojo dialog. Here I am giving the link of page where user can go and see what kind of effect I want to achieve this effect with jquery dialog open and close. So please go to the link page and just click on view example button and see how the dialog appears with effect.

So I want that when user click on my button then dialog should open like Dojo with transfer effect and when close dialog then dialog should zoom out to button. Please guide me with code snippet that shows how I could get the same effect with jQuery dialog open and close.

THE code i copy which is not working

<%@ Page Language="C#" AutoEventWireup="true"    CodeFile="JQueryDialogWithTransferEffect.aspx.cs" Inherits="JQueryDialogWithTransferEffect" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org /TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="css/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet"    type="text/css" />
<script src="js/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.7.2.custom.min.js"type="text/javascript"></script>

 <style type="text/css">

.ui-effects-transfer 
{
 border: 2px dotted grey;
}
</style>
<script type="text/javascript">
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");
        alert("pp");
        // 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;
    });
});

</script>
</head>
<body>
<form id="form1" runat="server">
<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>
</form>
</body>
</html>

please just copy my code and run it in aspx file and see the result. please help me to get the error….what is wrong in my code. 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-26T08:19:10+00:00Added an answer on May 26, 2026 at 8:19 am

    You can specify effects the dialog should use when appearing/disappearing in the dialog options:

    $("#dialog").dialog({
      show: "slide",
      hide: "slide",
      autoOpen: false
    });
    

    Live example using the “slide” effect

    jQuery UI has a lot of effects available, you can find demos of them on this examples page. One of them is bound to be roughly what you’re looking for.


    Update: The “transfer” effect, specifically, is a pain. 🙂 I finally got it mostly working, you’ll want to tweak the durations and easings to tie up the parallel effects better:

    HTML:

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

    CSS:

    .ui-effects-transfer {
      border: 2px dotted grey;
    }
    

    JavaScript:

    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;
      });
    });
    

    Live example

    For more on easings (which would help tie up the effects better), see the easings showcase.

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

Sidebar

Related Questions

I know downcasting like this won't work. I need a method that WILL work.
I am using jquery ui . html : <div id=dialog style=border:1px solid green; width:150px;
does anybody know, how to make jQuery work in ckeditor plugin ? I created
I cannot get the following simple jQuery to work. I know I am overlooking
can i know how to work with sitemap path in asp.net is possible examle
I know there is ongoing work for in this regards but what is the
I know this won't work. I tried it in various forms and failed all
I know what MVC is and I work in webforms but I don't know
I know that XSLT does not work in procedural terms, but unfortunately I have
I know how to make the intellisense work in a .js file using this

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.