For smart Primates & ROBOTS (oh and ALIENS ).

Saturday, July 05, 2014

Image rotate in jQuery

Image rotate in jQuery


<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
</head>
<body>
<img style="transform: rotate(285.4deg);" id="myimg"  src="WOW.jpg">
<script type="text/javascript">
    jQuery(function($) {
        $(document).ready(function() {
            window.imagerotate = function () {
                $('#myimg').rotate({
                                angle:0,
                                animateTo:-360,
                                callback: imagerotate,
                                //t: current time,b: beginning value,c: change in value,d: duration
                                easing: function (x,t,b,c,d) {
                                    return c*(t/d)+b+10000;
                                }
                            });
                        };
                        setTimeout('imagerotate()', 1000);
                });
});
</script>
</body></html>          
Share:

0 comments:

Post a Comment

Featured Post

Core Web Vitals Assessment showing LCP 10.6s while google pagespeed report showing LCP 3.5s why?

Core Web Vitals Assessment showing LCP 10.6s while google pagespeed report showing LCP 3.5s why? So, you can face this situation while...

Ads Inside Post

Powered by Blogger.

Arsip

Blog Archive