title: javascript add new form
body: <p>I have created a html css javascript, a tree when you select an option, another options will be visible (according the first option selected) in this example there is only 2 options.</p>
  
  <p>the problem is that at the end, there is a button that should add a new form (row) with same options, to start all over, when i click that button it add new row but the script doesn't work, I have no idea how to fix it! </p>
  
  <p>Here is a <a href="https://jsfiddle.net/L3of8jkm/1/" rel="nofollow noreferrer">JSFiddle</a></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>$("#addMore").click(function() {
    $(".row-fluid:last").clone().appendTo(".wrapper");
  });
  
  $("#produse").change(function() {
    var $this = $(this),
      value = $this.val(); // save value
    $('.sub_select_class').hide(); // we hide every second select
    switch (value) { // we show only what needs to be visible
      case 'Canapele':
        $("#ModeleCanapele").show();
        break;
      case 'Coltare':
        $("#ModeleColtare").show();
        break;
      case 'Mobila':
        $("#ModeleMobila").show();
        break;
      case 'Fotolii':
        $("#ModeleFotolii").show();
        break;
      case 'Seturi':
        $("#ModeleSeturi").show();
        break;
        // ...etc
    }
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#ModeleColtare,
  #ModeleSeturi {
    display: none;
  }
  
  .new-rect {
    background: black;
    width: 100%;
    height: 30px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="wrapper"&gt;
    &lt;div class="row-fluid"&gt;
      &lt;table style="font-size:10px"&gt;
        &lt;tbody&gt;
          &lt;tr&gt;
            &lt;td&gt;
              &lt;select id="Volum"&gt;
                &lt;option value="1x "&gt;1x &lt;/option&gt;
                &lt;option value="2x "&gt;2x &lt;/option&gt;
                &lt;option value="3x "&gt;3x &lt;/option&gt;
                &lt;option value="4x "&gt;4x &lt;/option&gt;
                &lt;option value="5x "&gt;5x &lt;/option&gt;
                &lt;option value="6x "&gt;6x&lt;/option&gt;
              &lt;/select&gt;
            &lt;/td&gt;
            &lt;td&gt;
              &lt;select id="produse"&gt;
                &lt;option value="reset"&gt;Selecteaza Produs&lt;/option&gt;
                &lt;option value="Coltare"&gt;Coltare&lt;/option&gt;
                &lt;option value="Seturi"&gt;Seturi&lt;/option&gt;
              &lt;/select&gt;
            &lt;/td&gt;
            &lt;td&gt;
              &lt;select id="ModeleColtare" class="sub_select_class"&gt;
                &lt;option value="Coltar Vera"&gt;Coltar Vera&lt;/option&gt;
                &lt;option value="Coltar Onix"&gt;Coltar Onix&lt;/option&gt;
                &lt;option value="Coltar Olyve"&gt;Coltar Olyve&lt;/option&gt;
                &lt;option value="Coltar Adrian"&gt;Coltar Adrian&lt;/option&gt;
              &lt;/select&gt;
            &lt;/td&gt;
            &lt;td&gt;
              &lt;select id="ModeleSeturi" class="sub_select_class"&gt;
                &lt;option value="Set Dana"&gt;Set Dana&lt;/option&gt;
                &lt;option value="Set Ramona"&gt;Set Ramona&lt;/option&gt;
                &lt;option value="Set Gina"&gt;Set Gina&lt;/option&gt;
                &lt;option value="Set Olyve"&gt;Set Olyve&lt;/option&gt;
              &lt;/select&gt;
            &lt;/td&gt;
            &lt;td&gt;
              Alte Detalii: &lt;textarea rows="1" style="width:120px;"&gt;&lt;/textarea&gt; Pret: &lt;input type="text" size="3" /&gt; &lt;/td&gt;
            &lt;td&gt;
              &lt;button id="filter" name="filter" onclick="resetFunction()"&gt;Reset&lt;/button&gt;
            &lt;/td&gt;
          &lt;/tr&gt;
        &lt;/tbody&gt;
      &lt;/table&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div&gt;
    &lt;button id="addMore" class="btn btn-sm btn-primary"&gt;&lt;i class="fa fa-dot-circle-o"&gt;&lt;/i&gt; Add Row&lt;/button&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>