Copy codeThe Code is as follows:
<Style type = "text/css">
Table {border: 1px solid #666 ;}
Table td {border: 1px solid # eee; width: 200px; height: 200px ;}
Img {width: 200px; height: 200px; border: none; position: relative ;}
</Style>
<Script src = "jquery-1.9.1.js" type = "text/javascript"> </script>
<Script type = "text/javascript">
$ (Function (){
// $ ('Img '). click (function (){
// $ ('Img '). animate ({left:'-= 200px '}, 2000). animate ({left:'-= 200px '}, 2000)
//. Animate ({left: '+ = 400px', top: '-= 200px'}, 1 ). animate ({left: '-= 200px'}, 2000 ). animate ({left: '-= 200px'}, 2000)
//. Animate ({left: '+ = 400px', top: '-= 200px'}, 1 ). animate ({left: '-= 200x'}, 2000 ). animate ({left: '-= 200px'}, 2000)
//})
Var I = 0; var c = 0;
$ ('Img '). click (function (){
If (c <3 ){
If (I = 2 & c = 0) {$ ('img '). animate ({left: '+ = 400px', top: '-= 200px'}, 1); c ++}
Else if (I = 2 & c = 1) {$ ('img '). animate ({left:'-= 200px '}, 2000); c ++}
Else if (I = 2 & c = 2) {$ ('img '). animations ({left: '-= 200px'}, 2000); c = 0; I ++ ;}
Else if (I = 3 & c = 0) {$ ('img '). animate ({left: '+ = 400px', top: '-= 200px'}, 1); c ++}
Else if (I = 3 & c = 1) {$ ('img '). animate ({left:'-= 200px '}, 2000); c ++}
Else if (I = 3 & c = 2) {$ ('img '). animate ({left: '-= 200px'}, 2000); c ++ ;}
Else {$ ('img '). animate ({left:'-= 200px '}, 2000); I ++ ;}
}
})
})
</Script>
</Head>
<Body>
<Table cellpadding = "0" cellspacing = "0">
<Tr>
<Td> </td>
</Tr>
<Tr>
<Td> </td>
</Tr>
<Tr>
<Td> </td> </td>
</Tr>
</Table>
</Body>
</Html>