سلام باید تمام مقادیر به صورت ثابت حساب شود
کد HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title></title>
<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript">
var tmp = null;
$(document).ready(function () {
$(".a").mouseover(function () {
$(this).animate({
top:360,
left: 150,
width: 200,
height:200
},300);
});
$(".a").mouseout( function () {
$(this).animate({
top: 400,
left: 200,
width: 100,
height:100
},300);
});
$(".b").mouseover(function () {
$(this).animate({
top: 360,
left: 300,
width: 200,
height:200
},300);
});
$(".b").mouseout( function () {
$(this).animate({
top: 400,
left: 350,
width: 100,
height: 100
},300);
});
$(".c").mouseover(function () {
$(this).animate({
top: 400,
left: 450,
width: 200,
height:200
},300);
});
$(".c").mouseout( function () {
$(this).animate({
top: 400,
left: 500,
width: 100,
height: 100
},300);
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="a" style="width: 100px; height: 100px; position: absolute; left: 200px;
top: 400px; background-color: Red">
</div>
<div class="b" style="width: 100px; height: 100px; position: absolute; left: 350px;
top: 400px; background-color: Red">
</div>
<div class="c" style="width: 100px; height: 100px; position: absolute; left: 500px;
top: 400px; background-color: Red">
</div>
</form>
</body>
</html>
من به این شکل تغیر دادم درست شد