Created
March 10, 2018 16:03
-
-
Save redrambles/c01998a9e1404e7da9307158eda49a15 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/yiquben
This file contains 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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<button id="lolcatButton">Show me the LOLCat!</button> | |
<br><br> | |
<img id="lolcatImage" src=""> | |
<script id="jsbin-javascript"> | |
$(document).ready(function() { | |
var lolcatImage = document.getElementById("lolcatImage"); | |
var image = "https://s3.amazonaws.com/media.skillcrush.com/skillcrush/wp-content/uploads/2016/08/napTime.jpg"; | |
/*var lolcatButton = document.getElementById("lolcatButton");*/ | |
var showMeTheLolcat = function(){ | |
lolcatImage.src = image; | |
}; | |
/*lolcatButton.addEventListener("click", showMeTheLolcat);*/ | |
$("#lolcatButton").click(lolcatImage); | |
}); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">$(document).ready(function() { | |
var lolcatImage = document.getElementById("lolcatImage"); | |
var image = "https://s3.amazonaws.com/media.skillcrush.com/skillcrush/wp-content/uploads/2016/08/napTime.jpg"; | |
/*var lolcatButton = document.getElementById("lolcatButton");*/ | |
var showMeTheLolcat = function(){ | |
lolcatImage.src = image; | |
}; | |
/*lolcatButton.addEventListener("click", showMeTheLolcat);*/ | |
$("#lolcatButton").click(lolcatImage); | |
});</script></body> | |
</html> |
This file contains 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
$(document).ready(function() { | |
var lolcatImage = document.getElementById("lolcatImage"); | |
var image = "https://s3.amazonaws.com/media.skillcrush.com/skillcrush/wp-content/uploads/2016/08/napTime.jpg"; | |
/*var lolcatButton = document.getElementById("lolcatButton");*/ | |
var showMeTheLolcat = function(){ | |
lolcatImage.src = image; | |
}; | |
/*lolcatButton.addEventListener("click", showMeTheLolcat);*/ | |
$("#lolcatButton").click(lolcatImage); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment