title: Dynamic breadcrumb based on current page using Javascript/jQuery
body: <p>I've looked at the question <a href="https://stackoverflow.com/questions/16416842/jquery-dynamic-breadcrumb">here</a> and the answer looked good enough if one doesn't have to actually navigate too. </p>
  
  <p>I need a Javascript/jQuery script that, based on the URL of the current page, can create breadcrumbs with the parents of that page, IE: </p>
  
  <pre><code> &lt;nav class="items"&gt;
   &lt;ul&gt;
   &lt;li&gt;&lt;a href="test.html"&gt;Test 1&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;&lt;a href="test2.html"&gt;Test 2&lt;/a&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;a href="level1.html"&gt;Level 1&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="test/level2.html"&gt;Level 2&lt;/a&gt;
              &lt;ul&gt;
                  &lt;li&gt;&lt;a href="test/level2/level3.html"&gt;Level 3&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="test/level2/level32.html"&gt;Also at level 3&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;&lt;a href="test3.html"&gt;Test 3&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>If the user navigates to Level 3, based on current page, show:</p>
  
  <p>Home >> Test 2 >> Level 2 >> Level 3</p>
  
  <p>This script will be included in every page, so it works onload.</p>