Guest User

Untitled

a guest
Jul 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $log = $('#log');
  2.  
  3. $('body').ready(function() {
  4.     // spawn t1
  5.     $('body').append('<span id="t1"></span>').ready(function() {
  6.         $t1 = $('#t1');
  7.         $t1.hide();
  8.         // spawn t1 items
  9.         $t1.append('<span id="t1i1"></span>').ready(function() {
  10.             $t1i1 = $('#t1i1');
  11.             $t1i1.html('<img src="img/fc.png" />');
  12.         });
  13.         $t1.append('<span id="t1i2"></span>').ready(function() {
  14.             $t1i2 = $('#t1i2');
  15.             $t1i2.html('<img src="img/p23.png" />');
  16.         });
  17.         $t1.children().hide().css({'position': 'absolute'});
  18.     });
  19.  
  20.     // spawn t2
  21.     $('body').append('<span id="t2"></span>').ready(function() {
  22.         $t2 = $('#t2');
  23.         $t2.hide();
  24.         // span t2 items
  25.         $t2.append('<span id="t2i1"></span>').ready(function() {
  26.             $t2i1 = $('#t2i1');
  27.             //$t2i1.hide();
  28.             $t2i1.html('<img src="img/fc.png" />');
  29.         });
  30.         $t2.append('<span id="t2i2"></span>').ready(function() {
  31.             $t2i2 = $('#t2i2');
  32.             $t2i2.html('<img src="img/p55.png" />');
  33.         });
  34.         $t2.append('<span id="t2i3"></span>').ready(function() {
  35.             $t2i3 = $('#t2i3');
  36.             $t2i3.html('<img src="img/p.png" />');
  37.         });
  38.         $t2.children().hide().css({'position': 'absolute'});
  39.     });
  40. });
  41.  
  42. $(document).ready(function() {
  43.     // show t1 
  44.     setTimeout(function(){
  45.         $t1.show().ready(function() {
  46.             $t1i1.show();
  47.             setTimeout(function() {
  48.               $t1i1.hide();
  49.             }, 1500);
  50.             setTimeout(function() {
  51.               $t1i2.show();
  52.             }, 1500);
  53.         });
  54.     }, 0);
  55.     // hide t1
  56.     setTimeout(function(){
  57.         $t1.hide().ready(function() {
  58.             //$('#log').html('..hidden');
  59.         });
  60.     }, 4000);
  61.    
  62.     // show t2 
  63.     setTimeout(function(){
  64.         $t2.show().ready(function() {
  65.             $t2i1.show();
  66.             setTimeout(function() {
  67.                 $t2i1.hide();
  68.             }, 1500);
  69.             setTimeout(function() {
  70.                 $t2i2.show();
  71.             }, 1500);
  72.             setTimeout(function() {
  73.                 $t2i2.hide();
  74.             }, 3000);
  75.             setTimeout(function() {
  76.                 $t2i3.show();
  77.             }, 3000);
  78.         });
  79.     }, 4000);
  80.     // hide t2
  81.     setTimeout(function(){
  82.         $t2.hide().ready(function() {
  83.             $('#log').html('..hidden');
  84.         });
  85.     }, 8000);
  86. });
Add Comment
Please, Sign In to add comment