Documentation

Dependency Loader

  1. The plugin uses several 3rd party plugins to provide its functionality. These plugins are pdf.js, jPlayer, Flowplayer, and Google Code Prettify
  2. The dependency loader will auto load these plugins when they are required.
  3. The dependency loader uses yepnope
  4. Using the dependency loader is optional, but it is turned on by default.

If you are using the dependency loader, then the only resources you need to include in your page are jQuery, YepNope, and the Document Viewer plugin.

    
        <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>
    

If you decide not to use the dependency loader, you will need to manually include the 3rd party scripts in your page:


    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/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/libs/pdfjs/pdf.js"></script>
    <script type="text/javascript" src="../document-library/libs/google-code-prettify/src/prettify.js"></script>
    <script type="text/javascript" src="../document-library/libs/flowplayer/flowplayer-3.2.6.min.js"></script>
    <script type="text/javascript" src="../document-library/libs/jquery-jplayer/jquery.jplayer.js"></script>
    <script type="text/javascript" src="../plugin/ttw-document-library.min.js"></script>