Skip to content

Instantly share code, notes, and snippets.

@kyleturman
Created March 5, 2017 23:15
Show Gist options
  • Save kyleturman/b52a12b49a29099d5a337360b4134c4a to your computer and use it in GitHub Desktop.
Save kyleturman/b52a12b49a29099d5a337360b4134c4a to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=b52a12b49a29099d5a337360b4134c4a
<!DOCTYPE html>
<html>
<head>
<title>Spot the Bug - March 6th</title>
</head>
<body>
<div class='hero'>
<h1 class='hero-title'>Hello!</h1>
</div>
<div>
<h1>Welcome to my website!</h1>
</div>
</body>
</html>
{"enabledLibraries":["jquery"]}
function changeHeroBackgroundColor(color) {
$('.hero').css('background-color', color);
}
$(document).ready(function() {
setTimeout(function(){
// Changes the background color to blue
changeHeroBackgroundColor();
},500);
});
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