Quick Start
Make sure you have included the latest version of jQuery in your page, the Document library plugin file, the yepnope file, and the Document Library css.
<link rel="stylesheet" href="document-library/css/style.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="document-library/libs/yepnope.1.5.3-min.js"></script>
<script type="text/javascript" src="document-library/ttw-document-library.min.js"></script>
Once you have included all of the required files you can initialize the plugin
//your list of documents should be an array of objects.
var documentList = [
{"path": "sample-files/compressed.tracemonkey-pldi-09.pdf"},
{"path": "sample-files/sintel_trailer-720p.mp4"}
];
//create a new instance of the document viewer. The $anchor parameter is where the document library
//will load into the page.
var library = new DocumentLibrary({
$anchor: $('#full-width-container'),
});
//display the document viewer
library.load(documentList);