title: How to get the card dynamically on clicking button along with on click dynamically options in the card?
body: <p>I have created a card inside of it i gave two inputs, one for question and other for option, so here i want that second input(i.e option) to get more number of options in the same card and also I'm trying to get card dynamically for more number of times with the both question and option input. Please help me.</p>
  
  <pre><code>&lt;body&gt;
              &lt;form method="post" action=""&gt;
                  &lt;div class="cardBox"&gt;
                      &lt;div class="block"&gt;
                          &lt;div class="card"&gt;
                             &lt;div style="display: flex;"&gt;
                              &lt;input type="text" name="" class="form-control" placeholder="Enter Your Question"/&gt;
                              &lt;span class="removeCard"&gt;Remove&lt;/span&gt;
                             &lt;/div&gt;
                              &lt;div class="form-group fieldGroup"&gt;
                                  &lt;div class="input-group"&gt;
                                      &lt;input type="text" name="name[]" class="form-control" placeholder="Enter name"/&gt;
                                      &lt;div class="input-group-addon"&gt;
                                          &lt;a href="javascript:void(0)" class="btn btn-success addMore"&gt;&lt;span class="glyphicon glyphicon glyphicon-plus" aria-hidden="true"&gt;&lt;/span&gt; Add&lt;/a&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
  
                              &lt;!-- copy of things --&gt;
                              &lt;div class="form-group fieldGroupCopy" style="display: none;"&gt;
                                  &lt;div class="input-group"&gt;
                                      &lt;input type="text" name="name[]" class="form-control" placeholder="Enter name"/&gt;
                                      &lt;div class="input-group-addon"&gt;
                                          &lt;a href="javascript:void(0)" class="btn btn-danger remove"&gt;&lt;span class="glyphicon glyphicon glyphicon-remove" aria-hidden="true"&gt;&lt;/span&gt; Remove&lt;/a&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
  
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;span class="add"&gt;ADD&lt;/span&gt;
                  &lt;/div&gt;
              &lt;/form&gt;
  
              &lt;/body&gt;
  
              &lt;script src="jquery.js"&gt;&lt;/script&gt;
              &lt;script type="text/javascript"&gt;
                  $(document).ready(function(){
  
                      var maxGroup = 50;
  
                      //add more fields group
                      $(".addMore").click(function(){
                          if($('body').find('.fieldGroup').length &lt; maxGroup){
                              var fieldHTML = '&lt;div class="form-group fieldGroup"&gt;'+$(".fieldGroupCopy").html()+'&lt;/div&gt;';
                              $('body').find('.fieldGroup:last').after(fieldHTML);
                          }else{
                              alert('Maximum '+maxGroup+' groups are allowed.');
                          }
                      });
  
                      //remove fields group
                      $("body").on("click",".remove",function(){
                          $(this).parents(".fieldGroup").remove();
                      });
                  });
  
                  $('.add').click(function(){
                      $('.block:last').after(`&lt;div class="block"&gt;
                      &lt;div class="card"&gt;
                      &lt;input type="text" name="" class="form-control" placeholder="Enter Your Question"/&gt;&lt;span class="removeCard"&gt;Remove&lt;/span&gt;
                       &lt;div class="form-group fieldGroup"&gt;
                  &lt;div class="input-group"&gt;
                      &lt;input type="text" name="name[]" class="form-control" placeholder="Enter name"/&gt;
                      &lt;div class="input-group-addon"&gt;
                          &lt;a href="javascript:void(0)" class="btn btn-success addMore"&gt;&lt;span class="glyphicon glyphicon glyphicon-plus" aria-hidden="true"&gt;&lt;/span&gt; Add&lt;/a&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
                          &lt;div class="form-group fieldGroupCopy" style="display: none;"&gt;
                          &lt;div class="input-group"&gt;
                          &lt;input type="text" name="name[]" class="form-control" placeholder="Enter name"/&gt;
                          &lt;input type="text" name="email[]" class="form-control" placeholder="Enter email"/&gt;
                          &lt;div class="input-group-addon"&gt;
                          &lt;a href="javascript:void(0)" class="btn btn-danger remove"&gt;&lt;span class="glyphicon glyphicon glyphicon-remove" aria-hidden="true"&gt;&lt;/span&gt; Remove&lt;/a&gt;
                          &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;/div&gt;&lt;/div&gt;`)
  
           $(document).ready(function(){
              //group add limit
              var maxGroup = 50;
  
              //add more fields group
              $(".addMore").click(function(){
                  if($('body').find('.fieldGroup').length &lt; maxGroup){
                      var fieldHTML = '&lt;div class="form-group fieldGroup"&gt;'+$(".fieldGroupCopy").html()+'&lt;/div&gt;';
                      $('body').find('.fieldGroup:last').after(fieldHTML);
                  }else{
                      alert('Maximum '+maxGroup+' groups are allowed.');
                  }
              });
  
              //remove fields group
              $("body").on("click",".remove",function(){
                  $(this).parents(".fieldGroup").remove();
              });
          });
          });enter code here
  
          $('.cardBox').on('click','.removeCard',function(){
              $(this).parent().remove();
          });
              &lt;/script&gt;
  </code></pre>