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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:49:05+00:00 2026-06-03T16:49:05+00:00

Here i am trying to make an image move in a circular path but

  • 0

Here i am trying to make an image move in a circular path but it is not moving in a circular path..I have tried like this Moving a picture around slowly

CSS

#friends { position: absolute; }

Markup

<img src="http://jsfiddle.net/img/logo.png" 
id="friends"/>

JS

function moveit() {

    var newTop = Math.floor(Math.random()*350);
    var newLeft = Math.floor(Math.random()*1024);
    var newDuration = Math.floor(Math.random()*5000);

    $('#friends').animate({
      top: newTop,
      left: newLeft,
      }, newDuration, function() {
        moveit();
      });

}

$(document).ready(function() {
    moveit();
});

Live demo: http://jsfiddle.net/W69s6/embedded/result/

Any Suggestion??

  • 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-03T16:49:07+00:00Added an answer on June 3, 2026 at 4:49 pm

    Another variant (based on Div Moving in cycle rotation using Javascript):

    var t = 0;
    
    function moveit() {
        t += 0.05;
    
        var r = 100;         // radius
        var xcenter = 100;   // center X position
        var ycenter = 100;   // center Y position
    
        var newLeft = Math.floor(xcenter + (r * Math.cos(t)));
        var newTop = Math.floor(ycenter + (r * Math.sin(t)));
    
        $('#friends').animate({
            top: newTop,
            left: newLeft,
        }, 1, function() {
            moveit();
        });
    }
    
    $(document).ready(function() {
        moveit();
    });​
    

    DEMO: http://jsfiddle.net/W69s6/20/

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

Sidebar

Related Questions

i am trying to make my page looks like this : Here is an
I am trying to make overlay over image while dragging but its also moving
Here's the code I'm currently working with: http://jsfiddle.net/gEMCm/ I'm trying to make an image
I'm a bit stumped here, I'm trying to make it so an image (already
I'm trying to make an array from file path components. I have an array
I am trying to make an image gallery where you have a thumb of
I am trying to make an image animate and make it larger. I have
Im trying to make a pager for my image cycling using this plugin: http://jquery.malsup.com/cycle/pager3.html
I have an issue when I'm trying to make my image or label visible
I'm trying to rotate an image by just touch and move. Here is my

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.