look at this code . when I hover an img , all of the images will animate to top . i don,t want this. I want if i hover mouse on any of them , just that one animate to top.
<!DOCTYPE HTML>
<html>
<head>
<title>Majid</title>
<style>
* {
margin: 0 auto;
padding: 0;
}
body {
background: #333;
}
#box {
width: 390px;
height: 128px;
margin-top: 300px;
background: #555;
position: relative;
overflow:hidden;
}
#box a {
width: 128px;
height: 128px;
float: left;
margin: 0 1px;
}
.icon img{position:relative;}
</style>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
function icons(){
$("a img") .animate({top: '-125px'});
}
</script>
</head>
<body>
<div id="box">
<a href="JavaScript:();" onmouseover="icons();" class="icon"><img src="images/fb.jpg" alt="" /></a>
<a href="JavaScript:();" onmouseover="icons();" class="icon"><img src="images/tt.jpg" alt="" /></a>
<a href="JavaScript:();" onmouseover="icons();" class="icon "><img src="images/gp.jpg" alt="" /></a>
</div>
</body>