The css works without jquery, but I would like to apply it with jquery if possible, this is my code so far. <script> $(document).ready(function(){ $("<style type='text/css'> .flipped {-webkit-transform: rotate(180deg); -moz-transform: rotate(180deg); filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); } </style>").appendTo("head"); $("<div/>").addClass("flipped").appendTo("body"); }); </script> Code (markup): This is the css I am going from <style type="text/css"> html body { -webkit-transform: rotate(180deg); -moz-transform: rotate(180deg); filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); } </style> Code (markup): Thanks for the help!
The required code is as; $('html body').css('-webkit-transform', 'rotate(180deg)').css('-moz-transform', 'rotate(180deg)').css('filter','progid:DXImageTransform.Microsoft.BasicImage(rotation=2);'); Code (markup): Full example: <html> <head> <script type="text/javascript" src="reform/source/js/jquery-1.6.4.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('html body').css('-webkit-transform', 'rotate(180deg)').css('-moz-transform', 'rotate(180deg)').css('filter','progidXImageTransform.Microsoft.BasicImage(rotation=2);'); }); </script> </head> <body> <h1>hellow world</h1> </body> </html> HTML: