User:Sowminya Arikapudi/common.js: Difference between revisions

Jump to navigation Jump to search
Matt Pijoan (talk | contribs)
No edit summary
Matt Pijoan (talk | contribs)
Blanked the page
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
$.fn.animateRotate = function (angle, duration, complete) {
    return this.each(function () {
        var $elem = $(this);


        $({
            deg : 0
        }).animate({
            deg : angle
        }, {
            duration : duration,
            step : function (now) {
                $elem.css({
                    transform : 'rotate(' + now + 'deg)'
                });
            },
            complete : complete || $.noop
        });
    });
};

Latest revision as of 20:46, 22 September 2015