Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rotate DIV using jQuery with specific degree? [duplicate]

Possible Duplicate:
Rotating a Div Element in jQuery

How would I rotate a DIV and all the elements inside to a certain degree using jQuery? Like instead of just 90, 180, etc.. I would be able to set it at say 88.

like image 601
Earl Larson Avatar asked Dec 09 '22 09:12

Earl Larson


1 Answers

Here is the code for the modern browsers with CSS (applied through jquery for your case)

$('#divID').css({
     '-moz-transform':'rotate(88deg)',
     '-webkit-transform':'rotate(88deg)',
     '-o-transform':'rotate(88deg)',
     '-ms-transform':'rotate(88deg)',
     'transform':'rotate(88deg)'
});

Have a look at the transform docs property

like image 173
Gabriele Petrioli Avatar answered Dec 21 '22 22:12

Gabriele Petrioli