I am trying to grab three different json files that contain objects and load them into a single page using the jquery get method. I need to grab the objects and display all three to the page using jquery. I am having trouble loading and displaying all three... any help is appreciated. Thanks!
Here is the code:
$(document).ready(function(){
$("button").click(function(){
$.get("objectone.json", function(data){
$('#mydiv').html((JSON.stringify(data)));
});
$.get("objectwo.json", function(data){
$('#mydiv').html((JSON.stringify(data)));
});
$.get("objectthree.json", function(data){
$('#mydiv').html((JSON.stringify(data)));
});
});
});
and the HTML:
<button type="button" name="button">Click Me</button>
<div id="mydiv">
</div>