I'm trying to do some animation without Flash, I need a logo to load then shake before coming to a complete stop
I need it to happen on load (the shaking is a client request).
Right now, this works when you click it, but I need it to run automatically.
Here is my JavaScript code:
$(window).load(function() {
  jQuery.fn.shake = function() {
    this.each(function(i) {
      $(this).css({"position": "absolute"});
      for(var x = 1; x <= 3; x++) {
        $(this).animate({left: 43}, 10)
          .animate({left: 23}, 50)
          .animate({left: 23}, 10)
          .animate({left: 13}, 50)
          .animate({left: 43}, 50)
          .animate({left: 33}, 50)
          .animate({left: 43}, 50);
      }
    });
    return this;
  }
  $("#logo").click(function() {
    $(this).shake();
  });
});
The #logo element is the div that contains the image.
Any help would be greatly appreciated, thanks.
 
     
     
     
     
     
     
    