Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. .element {
  2. position: absolute;
  3. display: none;
  4. left: 0;
  5. top: 0;
  6. }
  7.  
  8. <div class="element">Some content here</div>
  9. <div class="element">Some content here</div>
  10.  
  11. var c = $('.element');
  12.  
  13. c.each(function () {
  14. c.css({
  15. 'left': dleft + 'px'
  16. });
  17.  
  18. c.css({
  19. 'top': dtop + 'px'
  20. });
  21.  
  22. c.setTimeout(function () {
  23. c.show(1000);
  24. }, sduration);
  25.  
  26. var dleft = 40;
  27. var dtop = 40;
  28. var sduration = 1000;
  29. var c = $('.element');
  30.  
  31. c.each(function() {
  32. c.css({
  33. 'left': dleft + 'px',
  34. 'top': dtop + 'px'
  35. });
  36. });
  37. setTimeout(function() {
  38. c.show(1000);
  39. }, sduration);​
  40.  
  41. var c = $('.element');
  42.  
  43. c.each(function () {
  44. c.css({ 'left': dleft + 'px', 'top': dtop + 'px' });
  45.  
  46. setTimeout(function () {
  47. c.show(1000);
  48. }, sduration);
  49. });
  50.  
  51. c.each(function() {
  52. c.css({
  53. 'left': dleft + 'px',
  54. 'top': dtop + 'px'
  55. });
  56. });
  57.  
  58. c.delay(1000).show();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement