JSFiddle - React, Tailwind, and code Playground

by Emmanuel Garcia

HTML

<fieldset>
        <legend>Do you currently have SolidWorks</legend>

        <ul>
            <li><label for=""><input type="radio" name="billing_place" value="1" id="rdYes" /> Yes</label></li>
            <li><label for=""><input type="radio" name="billing_place" value="2" id="rdNo" /> No</label></li>
        </ul>
    </fieldset>

    <fieldset id="billing_room_field" style="display:none;">
        <legend>Who is your SolidWorks reseller?</legend>
        <ul>
            <li><label for=""><input type="radio" name="reseller" value="Cad Connect" /> Cad Connect</label></li>
            <li><label for=""><input type="radio" name="reseller" value="Solid Solutions Management" /> Solid Solutions Management</label></li>
            <li><label for=""><input type="radio" name="reseller" value="TMS Scotland" /> TMS Scotland</label></li>
        </ul>

    </fieldset>

JavaScript

jQuery(function(){
        jQuery("input[name=billing_place]").change(function(){          
            
            
            if ($(this).val() == "1") {
            jQuery("#billing_room_field").slideDown()
            }
            else {
            jQuery("#billing_room_field").slideUp();
            }                                                            
       });
});