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

  • Home
  • SEARCH
  • 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 5962607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:07:45+00:00 2026-05-22T19:07:45+00:00

I have been trying to create rotating object using jQuery and without any other

  • 0

I have been trying to create rotating object using jQuery and without any other plugin. I seen the perfect way to make it cross-browser without much calculations, in this link. But when use it simply like this ——

    div#test {
        behavior:url(resource/-ms-transform.htc);
        -ms-transform:rotate(45deg);
        background:#333;
        color:#fff;
        padding:5px 5px;
        width:200px;
        height:auto;
    }

But with jQuery CSS like this ——–

    $(document).ready(function () {
      $('div#test').css({
        '-ms-transform':'rotate(45deg)'
      });
    });

It doesn’t seem to be working in the jQuery CSS mode, but with the normal CSS mode it seems to be working quite fine! Can anyone explain why is this happening and also provide me a solution (NOTE: I don’t want any jQuery Plugin for this solution, please!).

Here is my whole page ——

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
              <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
              <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
              <script type="text/javascript" src="jquery-1.6.min.js"></script>
              <script type="text/javascript">
                      $(document).ready(function () {
                         $('div#test').css({
                            '-ms-transform':'rotate(45deg)',
                            '-moz-transform':'rotate(45deg)',
                            '-o-transform':'rotate(45deg)',
                            '-webkit-transform':'rotate(45deg)',
                            '-khtml-transform':'rotate(45deg)'
                         });
                      });
              </script>
              <style type="text/css">
        div#test    {
            behavior:url(resource/-ms-transform.htc);
            background:#333;
            color:#fff;
            padding:5px 5px;
            width:200px;
            height:auto;
        }
               </style>
       </head>
       <body>
             <div id="test">This is a test!</div>
       </body>
</html>
  • 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-22T19:07:46+00:00Added an answer on May 22, 2026 at 7:07 pm

    I don’t know the HTC file in question (a link to where you got it from would be a handy edit to the question), but I am familiar with other HTCs such as CSS3Pie.

    My understanding of the way ‘behavior’ works is that the behavior itself only runs when an element triggers the stylesheet — ie typically only on page load, or if you change the class of an element.

    Using the example of CSS3Pie, one of the key things that makes it better than previous HTCs that did the same job is that it also sets up Javascript events which watch the element for any changes, and keeps the behavior features up-to-date. But this isn’t a feature that most HTCs do.

    I can’t be sure if this is the problem without knowing more about this specific HTC, but my guess is that it simply doesn’t have any code to keep track of the item after it’s done its initial transformation work.

    If that’s the case, you may find that no amount of tweaking the -ms-transform style will have any effect. In that case, the only alternative I can suggest is to have a series of classes with the various rotations you want, and use JQuery to switch between those classes; that ought to trigger the behavior to be run.

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

Sidebar

Related Questions

Hello Guys! I have been trying to create a cool Image Slider using Jquery!
I have been trying to create a regular expressions pattern that matches any reference
I have been trying to create a menu panel with jQuery that can be
I have been trying to create a simple calculator. Using PHP I managed to
Hello guys! I have been trying to create a if/else statement code in jQuery
I have been trying to implement Win32's MessageBox using GTK. The app uses SDL/OpenGL,
I have been trying to find a really fast way to parse yyyy-mm-dd [hh:mm:ss]
I have been trying to work my way through Project Euler, and have noticed
I have been trying to make a case for using Python at my work.
I have been trying to create something like: http://jquerystyle.com/index.php - when you go over

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.