title: How can I use “Little Loader” to load js files with dependencies?
body: <p>I am trying to speed up the loading of DataTables.js. Currently the websites UI is available for almost 4 seconds before the DataTables' features appear. One idea I had was to use a JavasScript loader. I did some research and found little-loader.js. The examples do not mention how to use it to load files with dependencies. How can I use it to load such files? Here is my code so far:</p>
  
  <pre><code>&lt;script src="https://unpkg.com/little-loader@VERSION/dist/little-loader.min.js"&gt;&lt;/script&gt;
  
  &lt;script&gt;
  window._lload("http://example.com/jquery-min.js", function (err) {
     // `err` is script load error.
     if( err === '' ) {
         window._lload("http://example.com/js/datatables-min.js", function (err) {
         //Maybe load other scripts
         } );
     }
  
  } );
  &lt;/script&gt;
  </code></pre>