title: Load first page onload and first nav button clicked onload
body: <p>First hello to all. I am relatively new to jquery and on a learning curve.</p>
  
  <p>My script is this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;script 
  src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"&gt;
  &lt;/script&gt;
  
  &lt;script&gt;
  $(function () {
  $('#content').find('#nav a').on('click', function (e) {
  e.preventDefault();
  var page = $(this).attr('href');
  $('#content2').load(page);
  });
  });
  $(function() &gt;{
  $('#content').find('#nav a').click(function() {
  $('#nav a').removeClass('selected');
  $(this).addClass('selected');              
  });
  });
  &lt;/script</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="content"&gt;
   &lt;embed type="image/svg+xml" src="x.svg" /&gt;
   &lt;div id="svgfix"&gt;
       &lt;embed type="image/svg+xml" src="1.svg" /&gt;
       &lt;embed type="image/svg+xml" src="2.svg" /&gt;
       &lt;embed type="image/svg+xml" src="3.svg" /&gt;
       &lt;embed type="image/svg+xml" src="4.svg" /&gt;
       &lt;embed type="image/svg+xml" src="5.svg" /&gt;
       &lt;embed type="image/svg+xml" src="6.svg" /&gt;
   &lt;/div&gt;
   &lt;div id="nav"&gt;
        &lt;a href="1.htm"&gt;&lt;img type="image/svg+xml" src="1.svg" /&gt;&lt;/a&gt;
        &lt;a href="2.htm"&gt;&lt;img type="image/svg+xml" src="2.svg" /&gt;&lt;/a&gt;
        &lt;a href="3.htm"&gt;&lt;img type="image/svg+xml" src="3.svg" /&gt;&lt;/a&gt;
        &lt;a href="4.htm"&gt;&lt;img type="image/svg+xml" src="4.svg" /&gt;&lt;/a&gt;
        &lt;a href="5.htm"&gt;&lt;img type="image/svg+xml" src="5.svg" /&gt;&lt;/a&gt;
        &lt;a href="6.htm"&gt;&lt;img type="image/svg+xml" src="6.svg" /&gt;&lt;/a&gt;
   &lt;/div&gt;
   &lt;/div&gt;
  &lt;div id="content2"&gt;&lt;h1&gt;&lt;/h1&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The script works well. The only problem i have, i want the first page to auto load and the first button to be on selected. I have tried to find a solution here and read trough the topics, but nothing has worked so fare.</p>
  
  <p>The script should load on click trough the nav bar with the 6 pages and it does and each button will be selected. But i would like on first page load, to auto select the first button and autoload the first page.</p>
  
  <p>I hope my question is understandable and thanks for your time and help in advance...</p>