jQuery addClass example

Change class name on click in jQuery

by Good Muyis

HTML

<li id="field_1_8" class="gfield _gmpff-fee gfield_price gfield_price_1_8 ">
<label class="gfield_label" for="input_1_8_1">Post Fee</label>
  <div class="ginput_container ginput_container_singleproduct">
    <input type="hidden" name="input_8.1" value="Post Fee" class="gform_hidden">
    <span class="ginput_product_price_label">Price:</span> <span class="ginput_product_price" id="input_1_8">$500.00</span>
    <input type="hidden" name="input_8.2" id="ginput_base_price_1_8" class="gform_hidden" value="$500.00">
    <input type="hidden" name="input_8.3" value="1" class="ginput_quantity_1_8 gform_hidden">
  </div>
</li>

JavaScript

var mFeeValue = jQuery('._gmpff-fee #ginput_base_price_1_8').html('value');

console.log('FEE '+mFeeValue);