jQuery Field Not Being Removed After Appending it
<p>I am running into an issue where I can't seem to get my jQuery script to remove fields after they have been added. I have tried a few changes, but nothing has worked. </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>$(function() {
  var dataSourceField = $('#sign-up-organization-discovery-source');
  var i = $('#sign-up-organization-discovery-source p').size() + 1;

  $('#sign-up-add-discovery-source').on('click', function() {
    $('&lt;p&gt;&lt;label for="discovery-source-field"&gt;&lt;input type="text" id="discovery-source-field" size="20" name="discoverySource" value="" placeholder="Input Value" /&gt;&lt;/label&gt; &lt;a href="#" id="remScnt"&gt;Remove&lt;/a&gt;&lt;/p&gt;').appendTo(dataSourceField);
    i++;
    return false;
  });
  $('#remScnt').on('click', function() {
    if (i &gt; 2) {
      $(this).parents('p').remove();
      i--;
    }
    return false;
  });
});</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 class="container"&gt;
  &lt;div class="col-md-6 col-md-offset-3"&gt;
    &lt;form action="/app/sign-up/organization" method="post"&gt;
      &lt;p&gt;{{user.email}}&lt;/p&gt;
      &lt;input type="hidden" name="admin" value="{{user.email}}"&gt;
      &lt;input type="hidden" name="organizationId"&gt;
      &lt;label for="sign-up-organization"&gt;Company/Organization Name&lt;/label&gt;
      &lt;input type="text" class="form-control" id="sign-up-organization" name="organizationName" value="" placeholder="Company/Organization"&gt;
      &lt;a href="#" id="sign-up-add-discovery-source"&gt;Add Another Discovery Source&lt;/a&gt;
      &lt;div id="sign-up-organization-discovery-source"&gt;
        &lt;input type="text" id="discovery-source-field" placeholder="Discovery Source" name="discoverySource"&gt;
      &lt;/div&gt;
      &lt;br /&gt;
      &lt;button type="submit"&gt;Submit&lt;/button&gt;
    &lt;/form&gt;
    &lt;a href="/login"&gt;Already have an account? Login here!&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>