Jquery rotate image animation example

Jquery rotate image animation example

tutorials - 5 undefined, 2020

Jquery rotate image animation example

In this example, we will create simple example of image rotate 90 degrees with css animation using javascript. you can easily image rotate 90 degrees, 180 degrees or 360 degrees using transform css with jquery animate function.

there are several plugin available for rotate image but i will suggest you using jquery animate and using CSS3 transform property. you need to just give value with deg as property. it will make simple and customize.

bellow example, when you click on button image will rotate each time 90 deg. you can simple copy html file and check it. it is a very simple example, just check bellow code.


<!DOCTYPE html>



<title>Jquery rotate image animation example - ItSolutionStuff.com</title>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>



<img src="https://itsolutionstuff.com/frontTheme/images/logo.png">

<button>Rotate image</button>

<script type="text/javascript">

var tmpAnimation = 0;


var element = $("img");

tmpAnimation = tmpAnimation + 90;

$({degrees: tmpAnimation - 90}).animate({degrees: tmpAnimation}, {

duration: 2000,

step: function(now) {


transform: 'rotate(' + now + 'deg)'








I hope it can help you...

Our Sponsors

NodeJS Experts
React Experts
PHP Experts
AngularJS Experts
Aws Experts
Firebase Experts

Top Applications in TutorialStuff

Top Experts In TutorialStuff

Trending On TutorialStuff