-1

I'm working on a class project and trying to add multiple css prefixes in my jQuery, but it's not working. Any help would be greatly appreciated. When I leave it with only the -moz-transform, it works great in Firefox, but not in any other browser, so I'm trying to add all of the prefixes. Please let me know if anyone has an answer.

$(earthID).css({'-moz-transform':'rotate('+earthRotate+'deg)',
  '-webkit-transform':'rotate('+earthRotate+'deg)',
  '-o-transform':'rotate('+earthRotate+'deg)',
  'transform':'rotate('+earthRotate+'deg)'
});
Popnoodles
  • 28,388
  • 2
  • 42
  • 53

2 Answers2

1
$("#earthID").css({'-moz-transform':'rotate('+earthRotate+'deg)',
  '-webkit-transform':'rotate('+earthRotate+'deg)',
  '-o-transform':'rotate('+earthRotate+'deg)',
  'transform':'rotate('+earthRotate+'deg)'
});
Jaskaran singh Rajal
  • 2,201
  • 2
  • 15
  • 27
0

Please try this one

<div id="abc"> abc </div>
   <script>
     jQuery(document).ready(function() {
        jQuery("#abc").css({'color':'red','float':'right'});
     });
   </script>
Jaskaran singh Rajal
  • 2,201
  • 2
  • 15
  • 27