//changes var publicSpreadsheetUrl = 'https://docs.google.com/spreadsheets/d/1wUwyUvhMOSU1ecZIgAgfPKdGxH-gy2zNBZzZLAN9c0k/edit?usp=sharing'; function init() { var tabletop = Tabletop.init( { key: publicSpreadsheetUrl, callback: function(data, tabletop) { console.log(data); // for (var i = 0; i < data.length; i++) { // $('.post').append( // '
' + // '
' + // '

' + data[i].title + '

' + // data[i].body + // '
' + // '
' + // '' + // '
' + data[i].date + // '
' + // '
' + // '
'); // } for (var i = 0; i < data.length; i++) { $('.container').append( '
' + '
' + switch(data[i].destination){ case (data[i].destination == "спорт"): $(".mix").addClass("d-sport"); break; case (data[i].destination == "школьные предметы": $(".mix").addClass("d-scholar"); break; case (data[i].destination == "творчество"): $(".mix").addClass("d-art"); break; case (data[i].destination == "soft skills"): $(".mix").addClass("d-softskills"); break; } + '
' + '
' + '' + '
' + '' + '
' ); } }, simpleSheet: true }); } function showInfo(data, tabletop) { alert('Successfully processed!') console.log(data); } //Пробегаемся циклом по элементам в Google таблице window.addEventListener('DOMContentLoaded', init)