I'm currently trying to randomly append the JSON data from google spreadsheet. Any help? Currently, I'm successful in appending the data to a div but it all appears in sequence. How do I randomize it? Thanks
$(document).ready(function() {
$(function listBooks() {
$.getJSON("https://spreadsheets.google.com/feeds/list/0Am2EHR2fZWeDdDZmTXhZUkJYZ09xNDhHeXM5Z0ZwQnc/od6/public/values?alt=json-in-script&callback=?", function (data) {
$('div#book-list').append('<ul class="items"></ul>');
$.each(data.feed.entry, function(i,entry) {
var item = '<span style="display:none">' + entry.id.$t + '</span>';
item += '<a href="' + entry.gsx$link1.$t + '" onclick="enablesubmit();" target="_blank">Click</a> ';
item += '<a href="' + entry.gsx$link2.$t + '" onclick="enablesubmit();" target="_blank">Click</a> ';
item += '<a href="' + entry.gsx$link3.$t + '" onclick="enablesubmit();" target="_blank">Click</a> ';
item += '<a href="' + entry.gsx$link4.$t + '" onclick="enablesubmit();" target="_blank">Click</a> ';
$('.items').append('<li>' + item + '</span></li>');
});
});
});
});