I have a site made as shown in this jsfiddle:
$.getJSON('eventbrite.json', function(data) {
var events = [];
var j = 0;
for (var i in data) {
events[i][0] = data[i].event.title;
}
$('.btn-lg').click(function() {
$('#tester').replaceWith("<div id='tester'>" + events[j][0] + "</div>");
j = j + 1;
})
$("div.swiper").on("swipe",function() {
$('#tester').replaceWith("<div id='tester'>" + events[j][0] + "</div>");
j = j + 1;
})
});
I'm trying to get the 2nd dimension to store the event title, so that I can then add event date and distance in events[j][1] and events[j][2].
However, adding the second dimension (ie the events[i][0]) means no results are returned.