title: How to change the input fields name in a row on checkbox click
body: <p>Change the input field name of the checked check box row </p>
  
  <p>Note: Type field may or may not exist in every row.</p>
  
  <p>Like if name[] and type[] fields exists,change both name to name1[] and type1[]. or just change the name of name[] field if type[] does not exists.</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>$(document).ready(function() {
  $(".click1").on('change', function() {
              if($(this).is(":checked")) {          
                 alert('checked')
              }        
          });
   });</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;li id="row_3"&gt;
     &lt;div class="col-md-6"&gt;
        &lt;input type="text"  name="name[]"&gt;
         &lt;input type="text"  name="type[]"&gt;
         &lt;input type="checkbox" name="click" class="click1"&gt;
        &lt;/div&gt;
     &lt;/div&gt;
  &lt;/li&gt;</code></pre>
  </div>
  </div>
  </p>