// Generator, by Geoff $(document).ready(function(){ $.getJSON("lessons.json", function(data) { var wordsHtml = ''; var sidebarHtml = ''; var lessonIndex = 0; $.each(data, function(lesson, wordList){ lessonIndex++; $.each(wordList, function(key, word){ wordsHtml += ' '; }); sidebarHtml += '
  • '+ lesson +'
  • '; }); $('#words').html(wordsHtml); $('#lessonIndex').html(sidebarHtml); swapView(1) }); }); function swapView(newView){ $(".lesson").hide(1000); $(".lesson-" + newView).show(1000); } function englishSay(textToSay) { responsiveVoice.speak(textToSay); }