Created
December 8, 2017 18:39
-
-
Save TheCase/574cb685151b7508595155f6a1a92a11 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
$(document).ready(function() { | |
$('#list-users-button').click(function(){ | |
$.getJSON('https://jsonplaceholder.typicode.com/users', | |
function (data) { | |
//console.log("> ", data); | |
$("#list-results-table tbody").append("<table>"); | |
for ($i=0; $i < data.length; $i++){ | |
$("#list-results-table tbody").append('<tr><td>' + data[$i].name + '</td></tr>'); | |
} | |
}); | |
});}); |
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
#list-users-button { | |
background-color: green; | |
color: white; | |
border-width: 2px; | |
border-color: #000; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment