Guest User

Untitled

a guest
May 30th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. <!-- The page DOM needs a container for each note, uniquely identified as `DC-note-{note_id}`. These can go anywhere in your page, though, so long as it's BEFORE the JavaScript below. -->
  2. <div id="DC-note-{first_note_id}" class="DC-note-container"></div>
  3. <div id="DC-note-{second_note_id}" class="DC-note-container"></div>
  4. <div id="DC-note-{third_note_id}" class="DC-note-container"></div>
  5.  
  6. <!-- Only include the loader once; this and the other script tag should go at/near the bottom of the page. -->
  7. <script src="//s3.amazonaws.com/s3.documentcloud.org/notes/loader.js"></script>
  8.  
  9. <script>
  10. // Load each note individually.
  11. dc.embed.loadNote('//www.documentcloud.org/documents/{document_slug}/annotations/{first_note_id}.js');
  12. dc.embed.loadNote('//www.documentcloud.org/documents/{document_slug}/annotations/{second_note_id}.js');
  13. dc.embed.loadNote('//www.documentcloud.org/documents/{document_slug}/annotations/{third_note_id}.js');
  14. </script>
  15.  
  16.  
  17. <!-- Here's what the above would look like in practice: -->
  18. <div id="DC-note-53674" class="DC-note-container"></div>
  19. <div id="DC-note-79590" class="DC-note-container"></div>
  20. <div id="DC-note-202703" class="DC-note-container"></div>
  21. <script src="//s3.amazonaws.com/s3.documentcloud.org/notes/loader.js"></script>
  22. <script>
  23. dc.embed.loadNote('//www.documentcloud.org/documents/282753-lefler-thesis/annotations/53674.js');
  24. dc.embed.loadNote('//www.documentcloud.org/documents/282753-lefler-thesis/annotations/79590.js');
  25. // Note that this next note is from an entirely different document; that's no problem, just make sure you use the full note URL as provided by the embed wizard
  26. dc.embed.loadNote('//www.documentcloud.org/documents/1659580-economic-analysis-of-the-south-pole-traverse/annotations/202703.js');
  27. </script>
Add Comment
Please, Sign In to add comment