Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Tommy Gebru
30,164 PointsAJAX Basics - The Office Status Project Revisited
No obvious error .... working on Chrome browser
$(document).ready(function (){
$.getJSON('../data/employees.json', function (response){
var statusHTML = '<ul class="bulleted">';//open ul
$.each(response, function(index, employee){
if(employee.inoffice === true){
statusHTML += '<li class = "in">';//create in
}
else {
statusHTML += '<li class = "out">';//create out
}//end if
statusHTML += employee.name + '</li>';
});//end each
statusHTML += '</ul>';//close ul
$('#employeeList').html = statusHTML;//update HTML
});//end JSON
});//end ready
Tommy Gebru
30,164 PointsFollowing the video, a list was supposed to appear in the workspace's preview.... that didnt happen
4 Answers
jason chan
31,009 PointsJquery is so much better. But cool that you got working in vanilla!
Tommy Gebru
30,164 Pointshave you done this step already in JS track
https://teamtreehouse.com/library/ajax-basics/jquery-and-ajax/the-office-status-project-revisited
jason chan
31,009 Pointsyes
Tommy Gebru
30,164 Pointscan you give me a hint as to what my mistake may be?
jason chan
31,009 Pointsare you console logging anything out? did you check for typos?
Tommy Gebru
30,164 Pointsconsole.log not working..... @Andrew McCormick any tips
Tommy Gebru
30,164 Pointsis it possible to call people for help?
jason chan
31,009 Pointshttps://treehouse-code-samples.s3.amazonaws.com/AJAX_Basics_Project_Files.zip
There is the download link for the finished project. Are you doing it in the workspace because you cannot do it outside of the workspace. It's treehouse specific api request.
Tommy Gebru
30,164 Pointsok but still not up https://w.trhou.se/zq77jwgl0w
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherSorry, I'm not sure I understand the question here
Is this related to a challenge?