Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$(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>');
}
});
});});
#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