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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:41:36+00:00 2026-05-24T09:41:36+00:00

My page displays an image. When the user hovers their mouse on the image,

  • 0

My page displays an image. When the user hovers their mouse on the image, I want to transfer that image to a center picture frame. Here is a demo: http://techfeed.net/dyany.com/

As you can see, my code keeps transferring the image to the picture frame over and over. I only want this transfer to happen once. I’ve googled and found mention of using the stop() function, but this doesn’t seem to work for me (and it seems to have a different purpose anyway.)

The CSS looks like this:

.genealogy {
    position: absolute;
    top: 100px;
    left: 100px;
}
.ui-effects-transfer {
    width: 300px;
    height: 300px;
    border: 1px dashed purple;
    -moz-border-radius: 150px;
    -webkit-border-radius: 150px;
}
.pictureFrame {
    width: 300px;
    height: 300px;
    position: absolute;
    top: 250px;
    left: 400px;
}

And the HTML:

<div class="demo">
    <img src="images/genealogy.png" id="imageSmall" class="genealogy" onClick="displayImage()" />
    <div class="pictureFrame" id="picFrame"></div>
</div>

And finally, the JavaScript:

function runTransfer() {
    var options = {};
    options = {
        to: "#picFrame",
        className: "ui-effects-transfer"
    };

    // run the effect
    $("#imageSmall").effect("transfer", options, 1000, afterTransfer);
};

function afterTransfer() {
    setTimeout(function() {
        $("#picFrame").append('<img src="images/genealogyLarge.png">');
        $("#imageSmall").hide();
    }, 0);
};

// set effect from select menu value
$("#imageSmall").hover(function() {
    runTransfer();
    return false;
});
  • 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-24T09:41:36+00:00Added an answer on May 24, 2026 at 9:41 am

    Your problem is that your hover callback is being called multiple times. First it is called when your mouse goes over the small image, then you create an element above your thumbnail (i.e. between the mouse and your thumbnail). Then that element moves and you get another hover. Rinse and repeat until the first animation finishes and makes the thumbnail go away.

    Switching to one should sort you out:

    $('#imageSmall').one('mouseover', function() {
        runTransfer();
    });
    

    For example: http://jsfiddle.net/ambiguous/tsKnz/

    If all you want to do is call runTransfer (and runTransfer doesn’t take any arguments), you could just do this:

    $('#imageSmall').one('mouseover', runTransfer);
    

    And an example of this version: http://jsfiddle.net/ambiguous/tsKnz/1/

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

Sidebar

Related Questions

I want to have a popup window such that when the user hovers mouse
I have a div in the center of a page that displays some content.
I want to create a product sales page that displays a product images (with
I have a page that displays a list of locations chosen by the user,
I'm working on a page that displays several hundred images at once. I'm using
I have an JSP page where I want to display an image from a
I have a page that, when accessed displays a table of information related to
I have a page that contains a user control, when the user clicks an
I have received the unfortunate requirement of building a page that displays a new
Here is functioning code on a form that displays a Tweet button -- the

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.