Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.firstStepOne').click(function(){
- console.log('one'+$('#currentB').val());
- console.log('one'+$('#currentP').val());
- if(moved == false){
- moved = true;
- $('#currentB').val('1');
- $('#currentP').val('0');
- $('.firstStepTwo').animate({right: '+=200'}, {
- duration: 900,
- specialEasing: {
- width: 'linear',
- height: 'easeOutBounce'
- },
- complete:function(){
- $(this).rotate({ angle:0,animateTo:20,easing: $.easing.easeInOutExpo });
- }
- });
- $('.firstStepOne').animate({left: '+=200'}, {
- duration: 900,
- specialEasing: {
- width: 'linear',
- height: 'easeOutBounce'
- }
- }).css('z-index',1);
- }
- else {
- curB = $('#currentB').val();
- if(curB == 0){
- $('#currentB').val('1');
- $('#currentP').val('0');
- $('.firstStepTwo').rotate({ angle:0,animateTo:20});
- $('.firstStepTwo').css('z-index',0);
- $('.firstStepOne').rotate({ angle:0,animateTo:0});
- $('.firstStepOne').css('z-index',1);
- }
- }
- });
- $('.firstStepTwo').click(function(){
- console.log('two'+$('#currentB').val());
- console.log('two'+$('#currentP').val());
- if(moved == false){
- moved = true;
- $('#currentB').val('0');
- $('#currentP').val('1');
- $('.firstStepTwo').animate({right: '+=200'}, {
- duration: 900,
- specialEasing: {
- width: 'linear',
- height: 'easeOutBounce'
- }
- }).css('z-index',1);
- $('.firstStepOne').animate({left: '+=200'}, {
- duration: 900,
- specialEasing: {
- width: 'linear',
- height: 'easeOutBounce'
- },complete:function(){
- $(this).rotate({ angle:0,animateTo:350,easing: $.easing.easeInOutExpo });
- }
- });
- }
- else {
- curP = $('#currentP').val();
- if(curP == 0) {
- $('#currentB').val('0');
- $('#currentP').val('1');
- $('.firstStepTwo').rotate({ angle:0,animateTo:0,easing: $.easing.easeInOutExpo });
- $('.firstStepTwo').css('z-index',1);
- $('.firstStepOne').rotate({ angle:0,animateTo:-20,easing: $.easing.easeInOutExpo });
- $('.firstStepOne').css('z-index',1);
- }
- }
- });
Add Comment
Please, Sign In to add comment