// use this to isolate the scope (function () { if (!window.configuration.showPageNotes) { return; } $(document).ready(function () { $axure.player.createPluginHost({ id: 'pageNotesHost', context: 'interface', title: 'Page Notes' }); generatePageNotes(); // bind to the page load $axure.page.bind('load.page_notes', function () { $('#pageNameHeader').html(""); $('#pageNotesContent').html(""); //populate the notes var notes = $axure.page.notes; if (notes) { var pageName = $axure.page.pageName; $('#pageNameHeader').html(pageName); var showNames = window.configuration.showPageNoteNames; for (var noteName in notes) { if (showNames) { $('#pageNotesContent').append("
" + noteName + "
"); } $('#pageNotesContent').append("
" + notes[noteName] + "
"); } } return false; }); }); function generatePageNotes() { var pageNotesUi = "
"; pageNotesUi += "
"; pageNotesUi += "
"; pageNotesUi += ""; pageNotesUi += "
"; $('#pageNotesHost').html(pageNotesUi); } })();