Advertisement
Guest User

Untitled

a guest
Oct 3rd, 2014
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" ></script>
  5. <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
  6. <script src="http://code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
  7. <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
  8. </head>
  9. <style>
  10. * {
  11. margin-left:auto;
  12. margin-right:auto;
  13. width:800px;
  14. }
  15. #test {
  16. width:800px;
  17. border:1px solid black;
  18. }
  19. #test .ad {
  20. border:2px solid red;
  21. width:25px;
  22. height:25px;
  23. float:left;
  24. margin-left:200px;
  25. }
  26. #test .ado {
  27. border:2px solid yellow;
  28. width:25px;
  29. height:25px;
  30. float:left;
  31. }
  32. </style>
  33. <div id="test">
  34. <div class="ad">ad</div>
  35. <div class="ado">ado</div>
  36. <div style="clear:left;"></div>
  37. </div>
  38. <script>
  39. $(document).ready(function()
  40. {
  41. $("#test").click(function()
  42. {
  43. $("#test").animate({ left: '-12%'});
  44. });
  45. });
  46. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement