Advertisement
Guest User

two moving divs example revised

a guest
Mar 22nd, 2010
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.04 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2.        "http://www.w3.org/TR/html4/strict.dtd">
  3. <html>
  4. <head>
  5.         <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  6.         <title>jquery1</title>
  7.         <style type="text/css" media="screen">
  8.                 .something {
  9.  
  10.                 width: 100px;
  11.                 height: 50px;
  12.                 background-color: red;
  13.                 color: white;
  14.                 border: 4px solid black;
  15.                 margin: 100px 0 0 80px;
  16.  
  17.                 }
  18.         </style>
  19. </head>
  20. <body>
  21.         <div class = "something"><p>this is some text</p></div>
  22.         <div class = "something"><p>this is some more text</p></div>
  23.         <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.j\
  24. s" type="text/javascript" charset="utf-8"></script>
  25.         <script type="text/javascript">
  26.                 $('.something').animate({'margin-left': '400px'},1000);
  27.                 $('.something').animate({'margin-top': '300px'},1000);
  28.         </script>
  29. </body>
  30. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement