title: Not sure what I'm doing wrong with this Jquery
body: <p>So, I'm working on an HTML based site using Image maps and I've created some in-line DIV's with buttons working.</p>
  <p>I've been creating a second area that should launch Jquery to hide/show forms inside of a button, but For some reason the scripts do not work when launched via <code>&lt;script src=&quot;Domain.tld/script.js&quot;&gt;&lt;/script&gt;</code>
  But they do work when launched DIRECTLY into the code via <code>&lt;script&gt;</code> Code here <code>&lt;/script&gt;</code>
  Below is the non working version to see the buttons you must click the THIRD button on the page.</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-html lang-html prettyprint-override"><code>&lt;link rel="stylesheet" href="https://cronusdevelopment.github.io/IMVU/style.css" /&gt;
  &lt;link rel="stylesheet" href="https://cronusdevelopment.github.io/IMVU/shop.css" /&gt;
  &lt;script src="https://code.jquery.com/jquery-3.5.1.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cronusdevelopment.github.io/IMVU/frame.js"&gt;&lt;/script&gt;
  &lt;script src="https://cronusdevelopment.github.io/IMVU/shop.js"&gt;&lt;/script&gt;
  &lt;style&gt;
    table.imvuolstatuss {
      color: white;
      text-align: center;
          font-size: 25px;
      margin-left: 424px;
      margin-top: -799px;
  }&lt;/style&gt;
  &lt;div id="content_container"&gt;
    &lt;div id="home"&gt;
      &lt;br /&gt;&lt;br /&gt;
      &lt;p style="color: white;"&gt;HERE CONTENT FOR home&lt;/p&gt;
    &lt;/div&gt;
    &lt;div id="about"&gt;
      &lt;br /&gt;&lt;br /&gt;
      &lt;p style="color: white;"&gt;HERE CONTENT FOR about&lt;/p&gt;
    &lt;/div&gt;
    &lt;div id="shop"&gt;
      &lt;br /&gt;&lt;br /&gt;
      &lt;p style="color: white;"&gt;
      &lt;button id = "BtMale" class="ShopButtons"&gt;Male&lt;/button&gt;
  &lt;button id = "BtFemale" class="ShopButtons"&gt;Female&lt;/button&gt;
  &lt;button id = "BtFurn" class="ShopButtons"&gt;Room/Furn&lt;/button&gt;
  &lt;button id = "BtOther" class="ShopButtons"&gt;Other&lt;/button&gt;
  &lt;button id = "BtAll" class="ShopButtons" onclick=window.open("https://www.imvu.com/shop/web_search.php?manufacturers_id=196067881")&gt;Whole Shop&lt;/button&gt;
  &lt;form id="M" hidden&gt;
     &lt;br&gt;
     &lt;select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&amp;manufacturers_id=196067881&amp;sort=id&amp;sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');"&gt;
        &lt;option value="" selected&gt;Choose Something&lt;/option&gt;
        &lt;option value="41"&gt;Clothing for Male&lt;/option&gt;
        &lt;option value="71"&gt;&amp;nbsp;Male Accessories&lt;/option&gt;
        &lt;option value="70"&gt;&amp;nbsp;Male Bottoms&lt;/option&gt;
        &lt;option value="316"&gt;&amp;nbsp;Male Bundles&lt;/option&gt;
        &lt;option value="92"&gt;&amp;nbsp;Male Eyebrows&lt;/option&gt;
        &lt;option value="91"&gt;&amp;nbsp;Male Eyes&lt;/option&gt;
        &lt;option value="98"&gt;&amp;nbsp;Male Gloves&lt;/option&gt;
        &lt;option value="67"&gt;&amp;nbsp;Male Hairstyles&lt;/option&gt;
        &lt;option value="296"&gt;&amp;nbsp;Male Heads&lt;/option&gt;
        &lt;option value="102"&gt;&amp;nbsp;Male Shoes&lt;/option&gt;
        &lt;option value="68"&gt;&amp;nbsp;Male Skintones&lt;/option&gt;
        &lt;option value="69"&gt;&amp;nbsp;Male Tops&lt;/option&gt;
        &lt;option value="3088-3091"&gt;&amp;nbsp;Male Outfits &lt;/option&gt;
     &lt;/select&gt;
  &lt;/form&gt;
  &lt;form id="F" hidden&gt;
   &lt;br&gt;
     &lt;select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&amp;manufacturers_id=196067881&amp;sort=id&amp;sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');"&gt;
        &lt;option value="" selected&gt;Choose Something&lt;/option&gt;
        &lt;option value="40"&gt;Clothing for Female&lt;/option&gt;
        &lt;option value="153"&gt;&amp;nbsp;Female Accessories&lt;/option&gt;
        &lt;option value="78"&gt;&amp;nbsp;Female Bottoms&lt;/option&gt;
        &lt;option value="324"&gt;&amp;nbsp;Female Bundles&lt;/option&gt;
        &lt;option value="90"&gt;&amp;nbsp;Female Eyebrows&lt;/option&gt;
        &lt;option value="89"&gt;&amp;nbsp;Female Eyes&lt;/option&gt;
        &lt;option value="97"&gt;&amp;nbsp;Female Gloves&lt;/option&gt;
        &lt;option value="75"&gt;&amp;nbsp;Female Hairstyles&lt;/option&gt;
        &lt;option value="295"&gt;&amp;nbsp;Female Heads&lt;/option&gt;
        &lt;option value="101"&gt;&amp;nbsp;Female Shoes&lt;/option&gt;
        &lt;option value="76"&gt;&amp;nbsp;Female Skintones&lt;/option&gt;
        &lt;option value="128"&gt;&amp;nbsp;Female Tops&lt;/option&gt;
        &lt;option value="3088-3090"&gt;&amp;nbsp;Female Outfits&lt;/option&gt;
     &lt;/select&gt;
  &lt;/form&gt;
  &lt;form id="Rooms" hidden&gt;
  &lt;br&gt;
     &lt;select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&amp;manufacturers_id=196067881&amp;sort=id&amp;sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');"&gt;
        &lt;option value="" selected&gt;Choose Something&lt;/option&gt;
        &lt;option value="107"&gt;Rooms &amp; Furniture&lt;/option&gt;
        &lt;option value="1027"&gt;&amp;nbsp;Furniture&lt;/option&gt;
        &lt;option value="366"&gt;&amp;nbsp;Rooms&lt;/option&gt;
        &lt;option value="1279"&gt;&amp;nbsp;Furniture Bundles&lt;/option&gt;
        &lt;option value="2386"&gt;&amp;nbsp;Furnished Rooms&lt;/option&gt;
        &lt;option value="107-1027-1552"&gt;&amp;nbsp;Posing Spots&lt;/option&gt;
        &lt;option value="107-1027-1905"&gt;&amp;nbsp;Animated Pose Spots&lt;/option&gt;
     &lt;/select&gt;
  &lt;/form&gt;
  &lt;form id="Other" hidden&gt;
  &lt;br&gt;
     &lt;select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&amp;manufacturers_id=196067881&amp;sort=id&amp;sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');"&gt;
        &lt;option value="" selected&gt;Choose Something&lt;/option&gt;
        &lt;option value="108"&gt;Avatars&lt;/option&gt;
        &lt;option value="425"&gt;Pets&lt;/option&gt;
        &lt;option value="495"&gt;Stickers&lt;/option&gt;
     &lt;/select&gt;
  &lt;/form&gt;
  &lt;/p&gt;
    &lt;/div&gt;
    &lt;div id="shout"&gt;
      &lt;br /&gt;&lt;br /&gt;
      &lt;p style="color: white;"&gt;HERE CONTENT FOR shout&lt;/p&gt;
    &lt;/div&gt;
    &lt;div id="honor"&gt;
      &lt;br /&gt;&lt;br /&gt;
      &lt;p style="color: white;"&gt;HERE CONTENT FOR honor&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div id="layout-container"&gt;
    &lt;img
      src="https://i.imgur.com/vc0zoBl.png"
      width="1013"
      height="1300"
      border="0"
      usemap="#map"
    /&gt;
    &lt;map name="map"&gt;
      &lt;area
        shape="rect"
        coords="273,740,356,768"
        onclick="changeframe('home','frame1')"
      /&gt;
      &lt;area
        shape="rect"
        coords="360,740,445,768"
        onclick="changeframe('about','frame1')"
      /&gt;
      &lt;area
        shape="rect"
        coords="450,740,535,768"
        onclick="changeframe('shop','frame1')"
      /&gt;
      &lt;area
        shape="rect"
        coords="539,740,624,768"
        onclick="changeframe('shout','frame1')"
      /&gt;
      &lt;area
        shape="rect"
        coords="630,740,715,768"
        onclick="changeframe('honor','frame1')"
      /&gt;
    &lt;/map&gt;
    &lt;div id="frame1" class="box"&gt;&lt;/div&gt;
    &lt;script&gt;
      changeframe("home", "frame1");
    &lt;/script&gt;
  &lt;/div&gt;
  &lt;div id="OLStatus"&gt;
    &lt;table class="imvuolstatuss"&gt;
       &lt;tr&gt;
          &lt;td align='center'&gt;Status - &lt;img src="https://gaf210.gafcodes.com/get_online_status?u=196067881&amp;offline=https%3A%2F%2Fuserimages01.imvu.com%2Fproductdata%2Fstickers_af13a170f917065f15d41a7d6a484f37.gif&amp;online=https%3A%2F%2Favatars.imvu.com%2Fcatalog%2Fweb_images%2Fmy_page%2Fonline_under_image.gif&amp;unknown=https%3A%2F%2Favatars.imvu.com%2Fcatalog%2Fweb_images%2Fmy_page%2Fspace.gif" alt=""&gt;&lt;/td&gt;
       &lt;/tr&gt;
    &lt;/table&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>below is the working version.</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-html lang-html prettyprint-override"><code>&lt;link rel="stylesheet" href="https://cronusdevelopment.github.io/IMVU/shop.css" /&gt;
  &lt;script src="https://code.jquery.com/jquery-3.5.1.min.js"&gt;&lt;/script&gt;
    &lt;div id="shop"&gt;
      &lt;br /&gt;&lt;br /&gt;
      &lt;p style="color: white;"&gt;
      &lt;button id = "BtMale" class="ShopButtons"&gt;Male&lt;/button&gt;
  &lt;button id = "BtFemale" class="ShopButtons"&gt;Female&lt;/button&gt;
  &lt;button id = "BtFurn" class="ShopButtons"&gt;Room/Furn&lt;/button&gt;
  &lt;button id = "BtOther" class="ShopButtons"&gt;Other&lt;/button&gt;
  &lt;!--DO NOT UNTAG THIS AS IT'S NOT NEEDED YET.--&gt;
  &lt;!--&lt;button id = "BtAll" class="ShopButtons" onclick=window.open("https://www.imvu.com/shop/web_search.php?manufacturers_id=196067881")&gt;Whole Shop&lt;/button&gt;--&gt;
  &lt;form id="M" hidden&gt;
     &lt;br&gt;
     &lt;select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&amp;manufacturers_id=196067881&amp;sort=id&amp;sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');"&gt;
        &lt;option value="" selected&gt;Choose Something&lt;/option&gt;
        &lt;option value="41"&gt;Clothing for Male&lt;/option&gt;
        &lt;option value="71"&gt;&amp;nbsp;Male Accessories&lt;/option&gt;
        &lt;option value="70"&gt;&amp;nbsp;Male Bottoms&lt;/option&gt;
        &lt;option value="316"&gt;&amp;nbsp;Male Bundles&lt;/option&gt;
        &lt;option value="92"&gt;&amp;nbsp;Male Eyebrows&lt;/option&gt;
        &lt;option value="91"&gt;&amp;nbsp;Male Eyes&lt;/option&gt;
        &lt;option value="98"&gt;&amp;nbsp;Male Gloves&lt;/option&gt;
        &lt;option value="67"&gt;&amp;nbsp;Male Hairstyles&lt;/option&gt;
        &lt;option value="296"&gt;&amp;nbsp;Male Heads&lt;/option&gt;
        &lt;option value="102"&gt;&amp;nbsp;Male Shoes&lt;/option&gt;
        &lt;option value="68"&gt;&amp;nbsp;Male Skintones&lt;/option&gt;
        &lt;option value="69"&gt;&amp;nbsp;Male Tops&lt;/option&gt;
        &lt;option value="3088-3091"&gt;&amp;nbsp;Male Outfits &lt;/option&gt;
     &lt;/select&gt;
  &lt;/form&gt;
  &lt;form id="F" hidden&gt;
   &lt;br&gt;
     &lt;select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&amp;manufacturers_id=196067881&amp;sort=id&amp;sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');"&gt;
        &lt;option value="" selected&gt;Choose Something&lt;/option&gt;
        &lt;option value="40"&gt;Clothing for Female&lt;/option&gt;
        &lt;option value="153"&gt;&amp;nbsp;Female Accessories&lt;/option&gt;
        &lt;option value="78"&gt;&amp;nbsp;Female Bottoms&lt;/option&gt;
        &lt;option value="324"&gt;&amp;nbsp;Female Bundles&lt;/option&gt;
        &lt;option value="90"&gt;&amp;nbsp;Female Eyebrows&lt;/option&gt;
        &lt;option value="89"&gt;&amp;nbsp;Female Eyes&lt;/option&gt;
        &lt;option value="97"&gt;&amp;nbsp;Female Gloves&lt;/option&gt;
        &lt;option value="75"&gt;&amp;nbsp;Female Hairstyles&lt;/option&gt;
        &lt;option value="295"&gt;&amp;nbsp;Female Heads&lt;/option&gt;
        &lt;option value="101"&gt;&amp;nbsp;Female Shoes&lt;/option&gt;
        &lt;option value="76"&gt;&amp;nbsp;Female Skintones&lt;/option&gt;
        &lt;option value="128"&gt;&amp;nbsp;Female Tops&lt;/option&gt;
        &lt;option value="3088-3090"&gt;&amp;nbsp;Female Outfits&lt;/option&gt;
     &lt;/select&gt;
  &lt;/form&gt;
  &lt;form id="Rooms" hidden&gt;
  &lt;br&gt;
     &lt;select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&amp;manufacturers_id=196067881&amp;sort=id&amp;sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');"&gt;
        &lt;option value="" selected&gt;Choose Something&lt;/option&gt;
        &lt;option value="107"&gt;Rooms &amp; Furniture&lt;/option&gt;
        &lt;option value="1027"&gt;&amp;nbsp;Furniture&lt;/option&gt;
        &lt;option value="366"&gt;&amp;nbsp;Rooms&lt;/option&gt;
        &lt;option value="1279"&gt;&amp;nbsp;Furniture Bundles&lt;/option&gt;
        &lt;option value="2386"&gt;&amp;nbsp;Furnished Rooms&lt;/option&gt;
        &lt;option value="107-1027-1552"&gt;&amp;nbsp;Posing Spots&lt;/option&gt;
        &lt;option value="107-1027-1905"&gt;&amp;nbsp;Animated Pose Spots&lt;/option&gt;
     &lt;/select&gt;
  &lt;/form&gt;
  &lt;form id="Other" hidden&gt;
  &lt;br&gt;
     &lt;select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&amp;manufacturers_id=196067881&amp;sort=id&amp;sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');"&gt;
        &lt;option value="" selected&gt;Choose Something&lt;/option&gt;
        &lt;option value="108"&gt;Avatars&lt;/option&gt;
        &lt;option value="425"&gt;Pets&lt;/option&gt;
        &lt;option value="495"&gt;Stickers&lt;/option&gt;
     &lt;/select&gt;
  &lt;/form&gt;
  &lt;/p&gt;
    &lt;/div&gt;
    &lt;script src="https://cronusdevelopment.github.io/IMVU/shop.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>below is the Javascript/Jquery for the above.</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-html lang-html prettyprint-override"><code>$('#BtMale').on('click', function(e){
  
      $("#M").toggle();
      $(this).toggleClass('Male');
      if ($("#BtFemale").is(":enabled"))
              $("#BtFemale").prop("disabled",true);
               else
              $("#BtFemale").prop("disabled",false); 
              
          if ($("#BtFurn").is(":enabled"))
              $("#BtFurn").prop("disabled",true);
               else
              $("#BtFurn").prop("disabled",false);
  
          if ($("#BtOther").is(":enabled"))
              $("#BtOther").prop("disabled",true);
               else
              $("#BtOther").prop("disabled",false);
  });
  $('#BtFemale').on('click', function(e){
  
      $("#F").toggle();
      $(this).toggleClass('Female');
          if ($("#BtMale").is(":enabled"))
              $("#BtMale").prop("disabled",true);
               else
              $("#BtMale").prop("disabled",false);
   
          if ($("#BtFurn").is(":enabled"))
              $("#BtFurn").prop("disabled",true);
               else
              $("#BtFurn").prop("disabled",false);
  
          if ($("#BtOther").is(":enabled"))
              $("#BtOther").prop("disabled",true);
               else
              $("#BtOther").prop("disabled",false);
     
  });
  $('#BtFurn').on('click', function(e){
  
      $("#Rooms").toggle();
      $(this).toggleClass('Rooms');
          if ($("#BtMale").is(":enabled"))
              $("#BtMale").prop("disabled",true);
               else
              $("#BtMale").prop("disabled",false);
  
          if ($("#BtFemale").is(":enabled"))
              $("#BtFemale").prop("disabled",true);
               else
              $("#BtFemale").prop("disabled",false);
  
          if ($("#BtOther").is(":enabled"))
              $("#BtOther").prop("disabled",true);
               else
              $("#BtOther").prop("disabled",false);
     
  });
  $('#BtOther').on('click', function(e){
  
      $("#Other").toggle();
      $(this).toggleClass('Other');
          if ($("#BtMale").is(":enabled"))
              $("#BtMale").prop("disabled",true);
               else
              $("#BtMale").prop("disabled",false);
  
          if ($("#BtFemale").is(":enabled"))
              $("#BtFemale").prop("disabled",true);
               else
              $("#BtFemale").prop("disabled",false);
  
          if ($("#BtFurn").is(":enabled"))
              $("#BtFurn").prop("disabled",true);
               else
              $("#BtFurn").prop("disabled",false);
     
  });</code></pre>
  </div>
  </div>
  </p>
  <p>Any help would be greatly appreciated.</p>