console.log("Loading format_document.js\n"); $(document).ready(function(){ $('.sectionHeader').click(function () { console.log('section Header click *'); getXSLT("sectionHeader"); return false; //don't event bubble }); $('.sectionContainer').click(function () { console.log('section Container click *'); getXSLT("sectionContainer"); return false; // don't event bubble }); }); /* DOCUMENT SPECIFIC FUNCTIONS */ function displayTOC(checkbox) { if (checkbox.checked == true) { console.log("Show the TOC!"); displaySideBar(true); $("#tableOfContents").css("display", "block"); } else { console.log("Hide the TOC!"); $("#tableOfContents").css("display", "none"); if ($("#coverImage").css("display") == "none") displaySideBar(false); } return; } function displayBookCover(checkbox) { if (checkbox.checked == true) { console.log("Show the book cover!"); displaySideBar(true); $("#coverImage").css("display", "block"); } else { console.log("Hide the book cover!"); $("#coverImage").css("display", "none"); if ($("#tableOfContents").css("display") == "none") displaySideBar(false); } return; } function displaySideBar(toggle) { if (toggle == true) { console.log("Show the sidebar!"); $("#rightSidebar").css("display", "block"); } else { console.log("Hide the sidebar!"); $("#rightSidebar").css("display", "none"); } return; } function checkDocumentRadio() { var selection = $('input[name="documentChanges"]'); //document.quiz.colour; for (i=0; i'; $.post(post_url, {data: xml}, function(data) { console.log("Success, we have received data"); }, 'xml'); }