Created
March 5, 2017 23:21
-
-
Save kyleturman/f1eb9b2cf067b1577b0a0df779a6ffac to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=f1eb9b2cf067b1577b0a0df779a6ffac
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Spot the Bug - March 6th</title> | |
| </head> | |
| <body> | |
| <div class='hero'> | |
| <h1>Hello there!</h1> | |
| </div> | |
| <div> | |
| <h1>Welcome to my website</h1> | |
| <p>Fix the bug in the JavaScript for a surprise.</p> | |
| </div> | |
| </body> | |
| </html> |
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
| {"enabledLibraries":["jquery"]} |
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
| function changeBackgroundColor(className, color) { | |
| $(className).css('background-color', color); | |
| } | |
| $(document).ready(function() { | |
| setTimeout(function(){ | |
| // Changes the background color of hero to blue | |
| changeBackgroundColor('blue', '.hero'); | |
| }, 750); | |
| }); |
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
| /* Ignore - no bug here */ | |
| body { | |
| text-align: center; | |
| margin: 0; | |
| } | |
| .hero { | |
| background-color: white; | |
| color: white; | |
| height: 300px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| transition: background-color 0.3s ease-out; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment