Guest User

Untitled

a guest
Apr 22nd, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('.firstStepOne').click(function(){
  2. console.log('one'+$('#currentB').val());
  3. console.log('one'+$('#currentP').val());
  4.     if(moved == false){
  5.         moved = true;
  6.         $('#currentB').val('1');
  7.         $('#currentP').val('0');
  8.         $('.firstStepTwo').animate({right: '+=200'}, {
  9.             duration: 900,
  10.             specialEasing: {
  11.                 width: 'linear',
  12.                 height: 'easeOutBounce'
  13.             },
  14.             complete:function(){   
  15.                 $(this).rotate({ angle:0,animateTo:20,easing: $.easing.easeInOutExpo });
  16.             }
  17.         });
  18.    
  19.         $('.firstStepOne').animate({left: '+=200'}, {
  20.             duration: 900,
  21.             specialEasing: {
  22.                 width: 'linear',
  23.                 height: 'easeOutBounce'
  24.             }
  25.         }).css('z-index',1);
  26.     }
  27.     else {
  28.         curB = $('#currentB').val();
  29.         if(curB == 0){
  30.             $('#currentB').val('1');
  31.             $('#currentP').val('0');
  32.             $('.firstStepTwo').rotate({ angle:0,animateTo:20});
  33.             $('.firstStepTwo').css('z-index',0);
  34.             $('.firstStepOne').rotate({ angle:0,animateTo:0});
  35.             $('.firstStepOne').css('z-index',1);
  36.         }
  37.        
  38.     }
  39.    
  40. });
  41.  
  42. $('.firstStepTwo').click(function(){
  43. console.log('two'+$('#currentB').val());
  44. console.log('two'+$('#currentP').val());
  45.     if(moved == false){
  46.         moved = true;
  47.         $('#currentB').val('0');
  48.         $('#currentP').val('1');
  49.         $('.firstStepTwo').animate({right: '+=200'}, {
  50.             duration: 900,
  51.             specialEasing: {
  52.                 width: 'linear',
  53.                 height: 'easeOutBounce'
  54.             }
  55.         }).css('z-index',1);
  56.         $('.firstStepOne').animate({left: '+=200'}, {
  57.             duration: 900,
  58.             specialEasing: {
  59.                 width: 'linear',
  60.                 height: 'easeOutBounce'
  61.             },complete:function(){ 
  62.                 $(this).rotate({ angle:0,animateTo:350,easing: $.easing.easeInOutExpo });
  63.             }
  64.         });
  65.     }
  66.     else {
  67.         curP = $('#currentP').val();
  68.         if(curP == 0) {
  69.             $('#currentB').val('0');
  70.             $('#currentP').val('1');
  71.             $('.firstStepTwo').rotate({ angle:0,animateTo:0,easing: $.easing.easeInOutExpo });
  72.             $('.firstStepTwo').css('z-index',1);
  73.             $('.firstStepOne').rotate({ angle:0,animateTo:-20,easing: $.easing.easeInOutExpo });
  74.             $('.firstStepOne').css('z-index',1);
  75.         }
  76.  
  77.     }
  78. });
Add Comment
Please, Sign In to add comment