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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:57:12+00:00 2026-06-09T00:57:12+00:00

I have a div moving in a loop (with jquery). I am able to

  • 0

I have a div moving in a loop (with jquery). I am able to write the x,y position to the page; however, only the initial values get written to the page. Is there a way to update the values as the div moves?

var sun = $j(".sun");
var position = sun.position();
$j(".sun").circulate({
  speed: 3600,
  width: Wwidth,
  height: Wwidth,
  loop: true,
  zIndexValues: [1000, 1000, 1000, 1000]
});
console.log('x: ' + position.left + ' y: ' + position.top);
  • 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-09T00:57:13+00:00Added an answer on June 9, 2026 at 12:57 am

    Either you modify the circulate plugin you are using so it makes a callback every time it changes the position of the sun. Or you can just put your reading part in a setInterval statement:

    setInterval(function (){
       var sun = $j(".sun");
       var position = sun.position();
       console.log('x: ' + position.left + ' y: ' + position.top);
    },1000); // This code will be runned each 1000 ms, so you can modify it..
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So currently I have: #div { position: relative; height: 510px; overflow-y: scroll; } However
Which is a good jQuery slider for moving a div element. I have come
Hey i have a div moving via a jquery animation and i am trying
I have 9 boxes (div) on a page. I am able to move them
I have DIV element which only has a few lines in and a background
in my html page I have div with css: padding: 0px; color: rgb(51, 51,
I've downloaded a JQuery plugin for a mousehold event. http://remysharp.com/2006/12/15/jquery-mousehold-event/ I have this div
Sample page On the sample page I have set div#content { padding-bottom:20px; } which
I'm trying to learn some programming with jQuery. I have a div that has
Have such code: <div style=position:relative> <div id=t1 style=position:relative; top:100; left:100;></div> <div id=t2 style=position:relative; top:200;

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.