Last active
August 29, 2015 14:07
-
-
Save asok/976ce3445833af71fb91 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var create = function(entries) { | |
$.each($.grep(entries, function(_entry){ return _entry.fields.company }), | |
function(key, entry) { | |
var li = $(document.createElement('li')); | |
li.append($('<h3>' + entry.fields.company + '</h3>')); | |
li.append($('<span>' + entry.fields.years + '</span>')); | |
li.append($('<h4>' + entry.fields.position + '</h4>')); | |
li.append($('<p>' + entry.fields.jobDescription + '</p>')); | |
$('.work ul').append(li); | |
}) | |
} | |
client.entries({}, function(err, entries) { | |
if (err) { console.log(err); return; } | |
create(entries); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment