Skip to content

Instantly share code, notes, and snippets.

@Bijesse
Created November 16, 2016 15:15
Show Gist options
  • Save Bijesse/3e0d05ee3e6e169aa4bfbf15fa7b0f5f to your computer and use it in GitHub Desktop.
Save Bijesse/3e0d05ee3e6e169aa4bfbf15fa7b0f5f to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=3e0d05ee3e6e169aa4bfbf15fa7b0f5f
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div id="square"></div>
</body>
</html>
{"enabledLibraries":["jquery"]}
var divColor = "red";
$("#square").click(function(){
//on line 5 write a line of code that turns the div green
//on line 7 write a line of code that change the value of the variable to "green"
console.log("The div is " + divColor);
});
#square{
width: 200px;
height: 200px;
background: red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment