Skip to content

Instantly share code, notes, and snippets.

@mackenco
Forked from anonymous/index.html
Created December 14, 2015 21:29
Show Gist options
  • Save mackenco/433c74b4b742e92ffc74 to your computer and use it in GitHub Desktop.
Save mackenco/433c74b4b742e92ffc74 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/qomoji
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.pgraph {
background-color: lightgreen;
}
#p1 {
color: red;
}
#p2 {
color: blue;
}
</style>
</head>
<body>
<img id="otter"
src="http://bit.ly/RGOtter1">
<h1 id="message">What would you like to give Mr. Otter?</h1>
<img id="cups"
class="choice"
src="http://bit.ly/RG-Cups">
<img id="ball"
class="choice"
src="http://bit.ly/RG-balls">
<script id="jsbin-javascript">
$("#cups").click(function() {
$("#message").text("Mr. Otter hates this gift");
$("#otter").attr("src", "http://bit.ly/RGOtter-2");
});
$("#ball").click(function() {
$("#message").text("Mr. Otter loooves this gift");
$("#otter").attr("src", "http://bit.ly/RGOtter-3");
});
</script>
<script id="jsbin-source-css" type="text/css">.pgraph {
background-color: lightgreen;
}
#p1 {
color: red;
}
#p2 {
color: blue;
}
</script>
<script id="jsbin-source-javascript" type="text/javascript">$("#cups").click(function() {
$("#message").text("Mr. Otter hates this gift");
$("#otter").attr("src", "http://bit.ly/RGOtter-2");
});
$("#ball").click(function() {
$("#message").text("Mr. Otter loooves this gift");
$("#otter").attr("src", "http://bit.ly/RGOtter-3");
});</script></body>
</html>
.pgraph {
background-color: lightgreen;
}
#p1 {
color: red;
}
#p2 {
color: blue;
}
$("#cups").click(function() {
$("#message").text("Mr. Otter hates this gift");
$("#otter").attr("src", "http://bit.ly/RGOtter-2");
});
$("#ball").click(function() {
$("#message").text("Mr. Otter loooves this gift");
$("#otter").attr("src", "http://bit.ly/RGOtter-3");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment