title: How to replace part of a site, without reloading the entire site?
body: <p>Here is the relevant code:</p>
  
  <pre><code>&lt;body&gt;
      &lt;h1&gt;Music Nation&lt;/h1&gt;
      &lt;div id="navBar"&gt;
          &lt;ul&gt;
              &lt;li&gt;
                  &lt;a href="Welcome.html"&gt;Home&lt;/a&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;a href="Trance.html" id="tranceGen"&gt;Trance&lt;/a&gt;
                  &lt;ul&gt;
                      &lt;li&gt;
                          &lt;a href="MS.html"  id="artistMS"&gt;Markus Schulz&lt;/a&gt;
                      &lt;/li&gt;
                  &lt;/ul&gt;
             &lt;/li&gt;
         &lt;/ul&gt;
       &lt;/div&gt;
       &lt;div id="pjax-container"&gt;
               some text that should be replaced...
       &lt;/div&gt;
  &lt;script&gt;
          $(document).ready(function () {
              $("#tranceGen").click(function () {
  
                  e.preventDefault();
                  $("#pjax-container").load("Trance.html #pjax-container");
  
              });
          });
  &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>As far as I've read on the internet, by using this it should replace just a certain part of the page without reloading the whole page, but for some reason it doesn't work. It still loads the entire page.</p>
  
  <p>I've read how to use it from: <a href="http://api.jquery.com/load/" rel="nofollow noreferrer">http://api.jquery.com/load/</a>
  I've also read a few tutorials and I've read other questions here about the same subject, but nothing I try seems to work.</p>
  
  <p>I've also tried something else I've read in another tutorial, to remove the default action(load the page I clicked I presumed), by adding "e.preventDefault();", but that had no effect either.</p>
  
  <p>What am I doing wrong?
  I want to load the content of the "#pjax-container" in the "Trance.html" page in the current page's "#pjax-container" without reloading the entire page.
  I'm using Visual Studio 2017 on Windows 7 if that's somehow relevant.</p>
  
  <p>Also, in the "head" section I have:</p>
  
  <pre><code>&lt;script type="text/javascript" src="Scripts/jquery.pjax.js"&gt;&lt;/script&gt;
  &lt;script src="Scripts/jquery-1.9.1.js"&gt;&lt;/script&gt;
  </code></pre>