Created
October 5, 2017 00:33
-
-
Save DestinyLuong/3db3071589702812b857367ed5f9d1f2 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=3db3071589702812b857367ed5f9d1f2
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>My Name Is...</title> | |
</head> | |
<body> | |
<div class="blue bigger" id="name">My name is Mirza</div> | |
<div class="blue" id="location">I live in Jackson Heights, Queens</div> | |
<div class="green" id="hobby">I like to draw</div> | |
<div class="buttons"> | |
<button class="normal-button" id="name-button">Change Name</button> | |
<button class="normal-button" id="location-button">Change Location</button> | |
<button class="crazy-button" id="hobby-button">Change Hobby</button> | |
</div> | |
</body> | |
</html> | |
<!-- Do not write any HTML for this excercise --> |
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
// Write your javascript code her | |
//var input = $(input).val(); | |
//$("body").append(input); | |
$("#name-button").click( function(){ | |
$("#name").html("My name is Potato"); | |
$("#name").append("<img src='https://steamuserimages-a.akamaihd.net/ugc/543022736890858021/04BE3D54CC9C1209F858E722E15F936BC313ADEE/'>"); | |
}); | |
$("#location-button").click( function(){ | |
$("#location").html("I live in Australia"); | |
$("#location").append("<img src=''>"); | |
}); | |
$("#hobby-button").click( function(){ | |
$("#hobby").html("I like to drink 7 times chilled, 7 times purified Water"); | |
}); |
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
/* Do not write any CSS for this excercise */ | |
.blue { | |
color: blue; | |
} | |
.green { | |
color: green; | |
} | |
.bigger { | |
font-size: 20px; | |
} | |
.buttons { | |
margin-top: 50px; | |
padding: 10px; | |
} | |
.normal-button { | |
height: 30px; | |
} | |
.crazy-button { | |
height: 50px; | |
width: 200px; | |
background-color: black; | |
border: 4px dashed green; | |
font-size: 20px; | |
color: red; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment