Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery Clock – Rotating division around a radius (proof of concept)

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #41712
    von
    Member

    I had this idea for a clock bouncing around in my head for some time now, but finally got around to coding it. Essentially I have a second, minute, and hour ‘div’ that rotates around different radiuses(radii?) of the clock.

    [Rotate jQuery Clock](http://home.comcast.net/~vonholdt/test/rotate_clock/ “Rotate Clock (jQuery)”)

    **Meat of the functionality here:**
    _$(which).stop().html(“” + show + “”).animate({marginTop: $.sine(((degree-90)*(3.1415/180)))*radius+’px’, marginLeft: $.cosine(((degree-90)*(3.1415/180)))*radius+’px’ }, 250, ‘linear’);_

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.