Skip to content

Instantly share code, notes, and snippets.

@adambray
Created July 6, 2015 04:56
Show Gist options
  • Save adambray/852ffdbe76e72cce1f40 to your computer and use it in GitHub Desktop.
Save adambray/852ffdbe76e72cce1f40 to your computer and use it in GitHub Desktop.
domXyg
<h1>Click the red dot for a surprise!</h1>
<img src="http://media.giphy.com/media/seXDJPWScjklO/giphy.gif" id="laser_cat" />
var cat = {
name: "Frisky 'Cornelius' McWhiskertons",
pastimes: "chasing red dots, juding silly humans, and sitting on keyboards",
start: function() {
document.getElementById("laser_cat").addEventListener("click", function() {
alert("My name is " + this.name + " and I like " + this.pastimes);
});
}
}
cat.start();
@import url(http://fonts.googleapis.com/css?family=Poiret+One);
body {
font-family: 'Poiret One', cursive;
}
img {
width: 300px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment