Guest User

Untitled

a guest
Jan 22nd, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. var openspeed = 300;
  2. var closespeed = 300;
  3. $('.click').toggle(function(){
  4.  
  5. var vertical = 0;
  6. var horizontal = 0;
  7. var $one=$(this);
  8.  
  9. $one.next().children().each(function(){
  10. $(this).animate({
  11. top: '-' + vertical + 'px',
  12. left: horizontal + 'px',
  13. }, openspeed);
  14. vertical = vertical + 0;
  15. horizontal = (horizontal+89);
  16. });
  17.  
  18. $one.next().animate({
  19. top: '30px',
  20. left: '400px',
  21. right:'200px',
  22. zindex:'999'
  23. }, openspeed).find('li a>img').animate({
  24. width: '50px',
  25. marginLeft: '0',
  26. opacity:'1'
  27. }, openspeed);
  28.  
  29. $one.animate({
  30. paddingTop: '0'
  31. });
  32. },
  33.  
  34. function(){
  35. //reverse above
  36. var $one=$(this);
  37. $one.next().removeClass('openStack').children('li').animate({
  38. top: '-40px',
  39. left: '-390px',
  40. zindex:'-999',
  41. }, closespeed);
  42.  
  43. $one.next().find('li a>img').animate({
  44. width: '50px',
  45. marginLeft: '0',
  46. opacity:'0'
  47. }, closespeed);
  48. $one.animate({
  49. paddingTop: '0px'
  50. });
  51.  
  52. });
Add Comment
Please, Sign In to add comment