title: How to calculate value for subtotal with operations in JS
body: <p>Here the scenario, there are have radio button which it will checked radios that have 1 as "value", and the total will displayed in sub_total. I already get the value of sub_total but in this situation the sub_total must be in % value and have an operations.This is operations of sub_total:</p>
  
  <p>"value"/4*30% = _____%</p>
  
  <p>Here is my js code:</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function () {
      var $radios = $(':radio[name^="que_"]').change(function () {
  
          var totalPrice = $radios.filter(function () {
              return this.checked &amp;&amp; this.value === '1'
          }).length;
          $('#sub_total').val(totalPrice);
      });
      $radios.first().change()
  });
  </code></pre>
  
  <p></p>
  
  <p>Here is my html code as references:</p>
  
  <pre><code>    &lt;td&gt;{!! Form::radio('que_1',0,null) !!}&lt;/td&gt;
  &lt;td&gt;{!! Form::radio('que_1',1,null) !!}&lt;/td&gt;
  &lt;td&gt;{!! Form::radio('que_2',0,null) !!}&lt;/td&gt;
  &lt;td&gt;{!! Form::radio('que_2',1,null) !!}&lt;/td&gt;
  &lt;td&gt;{!! Form::radio('que_3',0,null) !!}&lt;/td&gt;
  &lt;td&gt;{!! Form::radio('que_3',1,null) !!}&lt;/td&gt;
  &lt;td&gt;{!! Form::radio('que_4',0,null) !!}&lt;/td&gt;
  &lt;td&gt;{!! Form::radio('que_4',1,null) !!}&lt;/td&gt;
  </code></pre>
  
  <p>Anyone can help me to show how it's work ?</p>