title: show div menu on load page
body: <p>I have this function where it shows divs when a link is clicked. Works great, but i want this to be a menu. Once the div is shown, it has links to another page. Which again works fine, but once the page is loaded i want the div still displayed, with the current menu list. It gets hidden when a new page has loaded. This is the code i have cobbled together. any ideas?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('#menu a').click(function(e){
    hideContentDivs();
    var tmp_div = $(this).attr('id');
  
    ($('.somthing').find('.'+tmp_div)).show();
  });
  
  function hideContentDivs(){
    $('.somthing div').each(function(){
      $(this).hide();});
  }
  hideContentDivs();</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#menu ul {
    list-style-image: url('socialicons/webicon-aboutme.png');
    margin: 0;
    padding: 0;
  }
  
  .somthing{
    padding-left: 10px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="menu"&gt;
    &lt;ul&gt;
      &lt;p class="paragraph material_left_menu_header_para"&gt;&lt;span class="Small_Header_Text"&gt;Marine Vinyls&lt;/span&gt;&lt;/p&gt;
      &lt;a class="link-text material_link_container" href="javascript:void(0)"id="CTP_Marine_Vinyls"&gt;&lt;span class="text-link-text-1"&gt;CTP Marine Vinyls&lt;/span&gt;&lt;/a&gt;
      &lt;a class="link-text material_link_container" href="javascript:void(0)"id="Nautolex_Vinyls"&gt;&lt;span class="text-link-text-1"&gt;Nautolex Vinyls&lt;/span&gt;&lt;/a&gt;
      &lt;p class="paragraph material_left_menu_header_para"&gt;&lt;span class="Small_Header_Text"&gt;Fabrics&lt;/span&gt;&lt;/p&gt;
      &lt;a class="link-text material_link_container" href="javascript:void(0)"id="AGUA"&gt;&lt;span class="text-link-text-1"&gt;AGUA&lt;/span&gt;&lt;/a&gt;
      &lt;a class="link-text material_link_container" href="javascript:void(0)"id="CoverTex"&gt;&lt;span class="text-link-text-1"&gt;CoverTex&lt;/span&gt;&lt;/a&gt;
      &lt;p class="paragraph material_left_menu_header_para"&gt;&lt;span class="Small_Header_Text"&gt;Acrylics&lt;/span&gt;&lt;/p&gt;
      &lt;a class="link-text material_link_container" href="javascript:void(0)"id="TopGun"&gt;&lt;span class="text-link-text-1"&gt;Topgun&lt;/span&gt;&lt;/a&gt;
      &lt;a class="link-text material_link_container" href="javascript:void(0)"id="Odyssey"&gt;&lt;span class="text-link-text-1"&gt;Odyssey&lt;/span&gt;&lt;/a&gt;
      &lt;a class="link-text material_link_container" href="javascript:void(0)" id="Acrylic_Canvas"&gt;&lt;span class="text-link-text-1"&gt;Acrylic Canvas&lt;/span&gt;&lt;/a&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  &lt;div class="somthing"&gt;
    &lt;div class="CTP_Marine_Vinyls" class="content"&gt;
      &lt;br&gt;
      &lt;p class="paragraph material_left_menu_header_para"&gt;&lt;span class="Small_Header_Text"&gt;CTP_Marine_Vinyls&lt;/span&gt;&lt;/p&gt;
      &lt;a class="link-text material_link_container" href="#" id="CTP_Marine_Vinyls"&gt;&lt;span class="text-link-text-1"&gt;Zander&lt;/span&gt;&lt;/a&gt;
    &lt;/div&gt;
    &lt;div class="Nautolex_Vinyls" class="content"&gt;
      &lt;br&gt;
      &lt;p class="paragraph material_left_menu_header_para"&gt;&lt;span class="Small_Header_Text"&gt;Nautolex_Vinyls&lt;/span&gt;&lt;/p&gt;
      &lt;a class="link-text material_link_container" href="#" id="Acrylic_Canvas"&gt;&lt;span class="text-link-text-1"&gt;Acrylic Canvas&lt;/span&gt;&lt;/a&gt;
    &lt;/div&gt;
    &lt;div class="AGUA" class="content"&gt;
      &lt;br&gt; 
      &lt;p class="paragraph material_left_menu_header_para"&gt;&lt;span class="Small_Header_Text"&gt;AGUA&lt;/span&gt;&lt;/p&gt;
      &lt;a class="link-text material_link_container" href="../../material_pages/Agua_Range/Vistas_Collection.php" id="Acrylic_Canvas"&gt;&lt;span class="text-link-text-1"&gt;Vistas_Collection&lt;/span&gt;&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>