Created
March 19, 2016 16:13
-
-
Save AnSavvides/8d82f7c9430f61b4a0ea to your computer and use it in GitHub Desktop.
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
<style> | |
#browser { padding: 20px; } | |
img { width: 100px; height: 100px; float: left; } | |
</style> | |
<h1>THE CATS</h1> | |
<button>Pls give me a cat</button> | |
<div id="cats"></div> | |
<script> | |
var catURL = 'http://thecatapi.com/api/images/get?format=src&type=gif'; | |
$('button').click(function() { | |
$('#cats').append( | |
$('<img/>').attr('src', catURL + '&' + new Date().getTime()) | |
); | |
}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment