-
-
Save codecademydev/1034076beeeff4821e1093bef91da51a to your computer and use it in GitHub Desktop.
Codecademy export
This file contains 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>Ghostly Divs</title> | |
<link rel='stylesheet' type='text/css' href='stylesheet.css'/> | |
<script type='text/javascript' src='script.js'></script> | |
</head> | |
<body> | |
<div>Home</div> | |
<div>About Us</div> | |
<div>Contact</div> | |
</body> | |
</html> |
This file contains 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
$(document).ready(function(){ | |
$('div').hover( | |
function(){ | |
$(this).addClass('active'); | |
}, | |
function(){ | |
$(this).removeClass('active'); | |
} | |
) | |
}) |
This file contains 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
div { | |
border-radius: 5px; | |
background-color: #ABCDEF; | |
transition: background-color 0.5s ease; | |
display:inline; | |
font-size:25px; | |
padding:20px; | |
border:1px solid #ccc; | |
margin-top:10px; | |
} | |
.active { | |
background-color:#556677; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment