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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:53:50+00:00 2026-06-14T16:53:50+00:00

i want image move on hover with condition : – image move away from

  • 0

i want image move on hover with condition :

- image move away from mouse for 100px to right if mouse come from left side and vice versa.
- image can continuously move to one direction, when hit #div boundary will move to opposite istead.

i hardly figure it out to combine it, here my basic code:

To move image on hover

$(document).ready(function()
{  $("#image").mouseover(function()
   {  $("#image").animate({left:'250px'});
   });
});

To catch mouse positin on hover

jQuery(document).ready(function(){
   $(document).mousemove(function(e){
      $('#status').html(e.pageX +', '+ e.pageY);
   }); 
})

.Any help would be appreciated. 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-06-14T16:53:51+00:00Added an answer on June 14, 2026 at 4:53 pm

    You could put your image in a div padded by 1px wide border divs. Attach the mouseover listener to each of these, for example the left entry listener to the left div, the right entry listener to the right div and so forth.

    HTML:

    <div id="box" style="background:#98bf21;height:100px;position: absolute;left:100px; width:200px;">
    <div id="skinDiv">
        <div id="leftboundary"></div>
    </div>
    </div>
    

    CSS:

    #leftboundary{
        height:100%;
        width:20px;
        position:absolute;
        top:0px;
        right:0px;
        background:blue;
    }
    

    Here’s a short fiddle reused from a different question I answered: http://jsfiddle.net/PRZYN/10/

    EDIT: Improved fiddle: http://jsfiddle.net/PRZYN/11/

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

Sidebar

Related Questions

I want slightly move the image on mouse over, but it doesn't work. Images
Simply put, I want an image to move up and down and not left
I want to move an image when I mouse over and put it back
I want to move an image from 0,0 to 100,100 on android. I'm using
I want to move an image within a circle with my touch on move.
I have an image that I want to move. I can move the element
Let's say I want an image to be resized to 100px x 100px. I
If I don't want the image to be downloaded from server , until user
Well, i want house image to rotate from -5° to 5° and i wrote
I want that when mouse is over an image, an event should be triggered

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.