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 trialJosuel Garcia
6,069 PointsEmployee Status does not load in Chrome
Even when I use your finished code Dave google chrome will not load the employee status there are no errors in the console
$(document).ready(function () {
$.getJSON('../data/employees.json', function (data) {
var statusHTML = '<ul class="bulleted">';
$.each(data,function (index, employee) {
if (employee.inoffice === true) {
statusHTML +='<li class="in">';
} else {
statusHTML +='<li class="out">';
}
statusHTML += employee.name + '</li>';
});
statusHTML += '</ul>';
$('#employeeList').html(statusHTML)
}); // end getJSON
}); // end ready
1 Answer
Emmanuel Obi
14,912 PointsHey, Josuel. I suppose this issue is some type of security measure, but yes: XMLHttpRequests to a local file does not seem to be supported at the moment for Chrome and IE. If you reference this same code from Firefox, it should work like a charm. Here's a link to a discussion on the topic.
Josuel Garcia
6,069 Pointsthanks alot appreciate it.
Josuel Garcia
6,069 PointsJosuel Garcia
6,069 PointsI even disabled my dev tools since that would cause problems with other challenges if there enabled.