Search code examples
jqueryhtmlcssgraphical-logo

HTML5 Spinning Logo


I am trying to achieve a logo that spins around on a slight delay after page load. At the moment I am using this code pretty much exactly, however at the moment it works when the user flicks the image, as i said, I just want it to spin on load.

Total newbie at JS, I would do a jsFiddle, but am having trouble to get it to work at all in there. Can anyone help me out?

http://925html.com/files/html5logo/ < Current Code

Thanks, Red


Solution

  • Seems you can do this:

    YUI().use('transition', function (Y){
                        Y.one('#logo').transition({
                            transform    : 'rotateY(' + 360 + 'deg)',
                            duration    : 2,
                            easing        : 'ease-out'
                        }, function(){
                            this.setStyle('webkitTransform', 'rotateY(0deg)');
                        });
    
                });
    

    http://jsfiddle.net/HFFDR/