Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created August 11, 2017 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/ea51799f7c6cdb08b9cb614e1e0d7091 to your computer and use it in GitHub Desktop.
Save codecademydev/ea51799f7c6cdb08b9cb614e1e0d7091 to your computer and use it in GitHub Desktop.
Codecademy export
<html>
<head>
<title>Button Magic</title>
<link rel='stylesheet' type='text/css' href='stylesheet.css'/>
</head>
<body>
<div><br/><strong>Click Me!</strong></div>
<script type="text/javascript" src="script.js"></script>
</body>
</html>
$(document).ready(function(){
$('div').mouseenter(function() {
$('div').fadeTo('fast', 100);
});
$('div').mouseleave(function() {
$('div').fadeTo('fast', 0.5);
});
});
div {
height: 60px;
width: 100px;
border-radius: 5px;
background-color: #69D2E7;
text-align: center;
color: #FFFFFF;
font-family: Verdana, Arial, Sans-Serif;
opacity: 0.5;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment