weber,
кликните что бы испытать незабываемую поездку по золотому кольцу...
<!DOCTYPE html>
<html>
<head>
<style>
div{
margin:3px; width:100px; height:40px;
position:absolute; left:0px; top:30px;
background:green;
color: #FFFFFF;
}
</style>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>(function (c) {
var b = null,
f = c.fn.css;
c.fn.css = function (a, g) {
null === b && (b = "undefined" != typeof c.cssProps ? c.cssProps : "undefined" != typeof c.props ? c.props : {});
if ("undefined" == typeof b.transform && ("transform" == a || "object" == typeof a && "undefined" != typeof a.transform)) {
var h = b,
d;
a: {
d = this.get(0);
for (var k = ["transform", "WebkitTransform", "msTransform", "MozTransform", "OTransform"], e; e = k.shift();)
if ("undefined" != typeof d.style[e]) {
d = e;
break a
}
d = "transform"
}
h.transform = d
}
if ("transform" != b.transform)
if ("transform" == a) {
if (a = b.transform, "undefined" == typeof g && jQuery.style) return jQuery.style(this.get(0), a)
} else "object" == typeof a && "undefined" != typeof a.transform && (a[b.transform] = a.transform, delete a.transform);
return f.apply(this, arguments)
}
})(jQuery);</script>
<script>(function (c) {
function e(a) {
var b = a.data("_ARS_data");
b || (b = {
rotateUnits: "deg",
scale: 1,
rotate: 0
}, a.data("_ARS_data", b));
return b
}
function f(a, b) {
a.css("transform", "rotate(" + b.rotate + b.rotateUnits + ") scale(" + b.scale + "," + b.scale + ")")
}
c.fn.rotate = function (a) {
var b = c(this),
d = e(b);
if ("undefined" == typeof a) return d.rotate + d.rotateUnits;
if (a = a.toString()
.match(/^(-?\d+(\.\d+)?)(.+)?$/)) a[3] && (d.rotateUnits = a[3]), d.rotate = a[1], f(b, d);
return this
};
c.fn.scale = function (a) {
var b = c(this),
d = e(b);
if ("undefined" == typeof a) return d.scale;
d.scale = a;
f(b, d);
return this
};
var g = c.fx.prototype.cur;
c.fx.prototype.cur = function () {
return "rotate" == this.prop ? parseFloat(c(this.elem)
.rotate()) : "scale" == this.prop ? parseFloat(c(this.elem)
.scale()) : g.apply(this, arguments)
};
c.fx.step.rotate = function (a) {
var b = e(c(a.elem));
c(a.elem)
.rotate(a.now + b.rotateUnits)
};
c.fx.step.scale = function (a) {
c(a.elem)
.scale(a.now)
};
var h = c.fn.animate;
c.fn.animate = function (a) {
if ("undefined" != typeof a.rotate) {
var b, d = a.rotate.toString()
.match(/^(([+-]=)?(-?\d+(\.\d+)?))(.+)?$/);
d && d[5] && (b = c(this), b = e(b), b.rotateUnits = d[5]);
a.rotate = d[1]
}
return h.apply(this, arguments)
}
})(jQuery);</script>
</head>
<body>
Click here...
<div class="bus">bus</div>
<script>
$(document.body).click(function () {
var bus = $('.bus');
bus.animate({'left':'150px'}, 1500)
.animate({rotate: '+=90deg', scale: '1.25'}, 1000)
.animate({'top':'120px'}, 1500)
.animate({rotate: '+=90deg', scale: '.5'}, 1000)
.animate({'left':'0px'}, 1500)
.animate({rotate: '+=90deg','top':'30px' }, 1000)
.animate({rotate: '+=90deg', scale: '1'}, 1000)
});
</script>
</body>
</html>