Jquery: Add class to container if radio button is checked
<p>How do I add the class <code>active</code> to the element <code>payment--method</code> if the inner radio button is checked?</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-css lang-css prettyprint-override"><code>.method--description{
  display: none;
}

.payment--method.active .method--description{
  display: block;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="payment--method"&gt;

  &lt;div class="method--input"&gt;
    &lt;input type="radio" name="payment" value="1" id="payment_option1" checked="checked"&gt;
  &lt;/div&gt;

  &lt;div class="method--label"&gt;
    &lt;label for="payment_option1"&gt;Option 1&lt;/label&gt;
  &lt;/div&gt;

  &lt;div class="method--description"&gt;
    Option 1 description
  &lt;/div&gt;

&lt;/div&gt;

&lt;div class="payment--method"&gt;

  &lt;div class="method--input"&gt;
    &lt;input type="radio" name="payment" value="2" id="payment_option2"&gt;
  &lt;/div&gt;

  &lt;div class="method--label"&gt;
    &lt;label for="payment_option2"&gt;Option 2&lt;/label&gt;
  &lt;/div&gt;

  &lt;div class="method--description"&gt;
    Option 2 description
  &lt;/div&gt;

&lt;/div&gt;</code></pre>
</div>
</div>
</p>