I am new to using the jQuery JSON request method, and I have a feeling I am making a really silly mistake with it.
For some reason, the following is not being called. The alert box never opens, and the html variable never is populated.
Any Ideas?
$.getJSON('data.json', function(data){
json = data;
html = '<div class=' + id + '><div id=' + id + ' class="child" style="display:none;">';
for (x in json[elementId].images) {
html += '<img src=\"' + json[elementId].images[x] + '\" />';
}
html += '</div></div>';
alert(html);
});
Thanks a lot,
Isaac
idis a parameter passed to the parent function in which this $.getJSON lives.