title: Append limit 5 times only jquery .append
body: <p>I have seen similar questions with answers here but nothing could fix my issue. So i am asking it here again.</p>
  
  <p>With jquery i want users to add input field five times only , i used .append which is working fine but its adding unlimited times.</p>
  
  <pre><code>$("#add-cert").click(function(){
          var $addinput = $("&lt;div class='row'&gt;&lt;div class='small-6 columns'&gt;&lt;label class='right inline'&gt;Enter Your Certificate&lt;/label&gt;&lt;/div&gt;&lt;div class='small-6 columns'&gt;&lt;input type='text'&gt;&lt;/div&gt;&lt;/div&gt;");
  
          $("i").append($addinput);
  
          });
  </code></pre>
  
  <p>Please provide fix , i am new to jquery. I have tried following code too but with this code .append stops working:</p>
  
  <pre><code>$("#add-cert").click(function(){
          var $addinput = $("&lt;div class='row'&gt;&lt;div class='small-6 columns'&gt;&lt;label class='right inline'&gt;Enter Your Certificate&lt;/label&gt;&lt;/div&gt;&lt;div class='small-6 columns'&gt;&lt;input type='text' name='manual-cert'&gt;&lt;/div&gt;&lt;/div&gt;");
  
          var num = $("input[name='manual-cert']").length;
  
          if(num &gt; 5){
          $("i").append($addinput);
          }
          });
  </code></pre>