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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:25:40+00:00 2026-05-27T00:25:40+00:00

im building an analog clock using JavaScript, i know it will be alot easier

  • 0

im building an analog clock using JavaScript, i know it will be alot easier if i do it with jQuery but it’s not an option here.

Everything’s working in Chrome and Safari(meaning the webkit browsers) but not in any of the others.

Here is my tick method, basically it rotates the image according to the time.

function tick(deg, elmt){
document.getElementById(elmt).setAttribute(
        "style", "transform:rotate(" + deg + "deg);"
      + "-moz-transform: (" + deg + "deg);"
      + "-o-transform: (" + deg + "deg);"
      + "-webkit-transform:rotate(" + deg + "deg);"
      + "filter:progid:DXImageTransform.Microsoft.BasicImage(" + deg + "deg);"
    ); 
}

any suggestion to make it work?

  • 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-27T00:25:41+00:00Added an answer on May 27, 2026 at 12:25 am

    You have not used rotate for the -moz- and -o- properties, the rotation in the IE syntax

    function tick(deg, elmt){
    document.getElementById(elmt).setAttribute(
            "style", "transform:rotate(" + deg + "deg);"
          + "-moz-transform: rotate(" + deg + "deg);"
          + "-o-transform: rotate(" + deg + "deg);"
          + "-webkit-transform:rotate(" + deg + "deg);"
          + "-ms-transform:rotate("+ deg +"deg);"
        ); 
    }
    

    Demo at http://jsfiddle.net/gaby/fjHHX/3/


    Update

    Altered the code to support the IE9 -ms- extension and removed the filter one which does not allow for arbitrary rotations (only 0, 90, 180, 270 degrees)..

    For support of IE versions 8 and below you can use a matrix transformation but it gets ugly.. look at section .box_rotate at http://css3please.com/
    or look at the source of http://www.boogdesign.com/examples/transforms/matrix-calculator.html for how to do it

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

Sidebar

Related Questions

Building an app using android.support.v4.app , targeting API level 8. Everything's working as planned
When building up a list of options in a select list using Javascript I'd
Building an app with the Facebook JavaScript API that will embedded into a page
Building a quick view that will display a list of all days but only
Building a site on CargoCollective, but it appears they use jQuery 1.4.2 which seems
building a site using PHP and MySQL that needs to store a lot of
Building a Django app on a VPS. I am not very experienced with setting
Building a sample ASP.NET MVC app. Using the Membership API for authentication. For whatever
building libraries with waf is nice and I like the lib<targetname> naming scheme. But
Building a website using a PHP based Ecommerce product Magento. The problem I have

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.