Created
December 12, 2018 00:16
-
-
Save macloo/b7547e934ff8c570352e73e76892eb65 to your computer and use it in GitHub Desktop.
For Lorenzo P
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // old code | |
| /* | |
| $('#bebop-key').click(function(){ | |
| resetAll(); | |
| $('#bebop-key').hide(); | |
| $('#bebop').css('background-color', '#EC7063'); | |
| $('#hide3').show(); | |
| $('#bebop').animate({height: '510px'}, 400); | |
| $('#bebop').animate({width: '400px'}, 400); | |
| $('#bebop-text').delay(1100).slideDown(); | |
| }); | |
| */ | |
| // new code | |
| $('#bebop-key').click(function(){ | |
| resetAll(); | |
| $(this).hide(); | |
| let thing1 = $('#bebop'); | |
| let color = '#EC7063'; | |
| let thing2 = $('#hide3'); | |
| let thing3 = $('#bebop-text'); | |
| // call function, see below | |
| keyClicker(thing1, color, thing2, thing3) | |
| }); | |
| function keyClicker(thing1, color, thing2, thing3) { | |
| $(thing1).css('background-color', color); | |
| $(thing2).show(); | |
| $(thing1).animate({height: '510px'}, 400); | |
| $(thing1).animate({width: '400px'}, 400); | |
| $(thing3).delay(1100).slideDown(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment