Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. $("#e").click(function (e) {
  2. //done
  3. $("#re").animate({
  4. "margin-top": "104px"
  5. }, 800);
  6. $("#ret").animate({
  7. "margin-top": "104px"
  8. }, 800);
  9. $(".popu").animate({
  10. "margin-top": "-102px"
  11. }, 800);
  12. $("#s").show(200);
  13. e.stopPropagation();
  14.  
  15. <button type="button" id="moveLeft">Left</button>
  16. <button type="button" id="moveRight">Right</button>
  17.  
  18. <div id="test"></div>
  19.  
  20. #test {
  21. width: 50px;
  22. height: 50px;
  23. left: 0;
  24. top: 50px;
  25. background: #f00;
  26. position: fixed;
  27. }
  28.  
  29. var $box = $('#test');
  30.  
  31. $('#moveRight').click(function() {
  32. $box.animate({
  33. queue: true,
  34. left: "+=50"
  35. });
  36. });
  37.  
  38. $('#moveLeft').click(function() {
  39. $box.animate({
  40. queue: true,
  41. left: "-=50"
  42. });
  43. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement