title: How to set checked for radio-fields a multiple time by classname if one has changed
body: <p>I want to use a small form having two radio buttons using multiple time in my page.</p>
  
  <p>Radio buttons / "Form"</p>
  
  <pre><code>&lt;input type="radio" name="myselection" class="my_classname" value="my_option1" checked&gt;
  &lt;input type="radio" name="myselection" class="my_classname" value="my_option2"&gt;
  </code></pre>
  
  <p>This "Form" is used a second time in my page.</p>
  
  <p>Now I want to make sure that all radio-buttons / all Forms has the same checked element after one is clicked/changed.</p>
  
  <p>Is it possible and how Can I do it - I think with jquery/java-script?</p>
  
  <pre><code>  $(".my_classname").on('change', function() 
  {   
   //do something!?
  });
  </code></pre>
  
  <p>Thanks to teach and help me.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Maybe its imortant to know, that i use the input radio boxes in this way</p>
  
  <pre><code>&lt;div class="btn-group btn-group-toggle" data-toggle="buttons"&gt;
       &lt;label class="btn btn-primary btn-sm "&gt;
               &lt;input type="radio" name="my_name" class="my_classname1" value="my_value_1" autocomplete="off" checked&gt; value 1
                      &lt;/label&gt;
                      &lt;label class="btn btn-primary btn-sm active"&gt;
                        &lt;input type="radio" name="my_name" class="my_classname1" value="my_value_2" autocomplete="off"&gt; value 2
                      &lt;/label&gt;
                    &lt;/div&gt;
  </code></pre>
  
  <p>try like suggested answear in this ways failed</p>
  
  <pre><code>$('input:radio[class=my_classname1][value='+$(this).val()+']').prop('checked', true);
      $('input:radio[name=my_name][value='+$(this).val()+']').prop('checked', true);
  </code></pre>