Have a Snippet?

Keep, track and share your code snippets with your friends



jQuery: rotate(obj, degree) Share on Vkontakte

rotate(obj, degree)

function rotate(obj, degree) {
            $(obj).animate({
                        '-webkit-transform': 'rotate(' + degree + 'deg)',
                        '-moz-transform': 'rotate(' + degree + 'deg)',
                        '-ms-transform': 'rotate(' + degree + 'deg)',
                        '-o-transform': 'rotate(' + degree + 'deg)',
                        'transform': 'rotate(' + degree + 'deg)',
                        'zoom': 1
            }, 5000);
        }


Tag: jQuery, Animation, cross-browser

0 Comments