Chrome Extension

Radio Button

<div class="form-radio form-radio-block">
    <label class="form-radio-label active">
        <input name="address" class="form-radio-field" type="radio" value="" checked>
        <i class="form-radio-button"></i>
        <span>453/4, N M Joshi Marg, 229 Godiji Chawl, Kika Street, 1 St Bhoiwada, Kalbadevi</span>
    </label>
    <label class="form-radio-label">
        <input name="address" class="form-radio-field" type="radio" value="">
        <i class="form-radio-button"></i>
        <span>G1/c, Reena Apt, Fatak Rd, Nr Mandali Talav, Bhayander West</span>
    </label>
</div>

<script>
    $(function() {
        $('.form-radio-block [type="radio"]').on('change', function() {
            $(this).parent().addClass('active').siblings().removeClass('active');
        });
    });
</script>

Do you know, you can create and search your own code snippets on Devsheet. Store your code on cloud using devsheet and search using its chrome extension. Is it look cool?

On click radio button selection changes

Was this helpful?
0 Comments
Never leave your website again in search of code snippets by installing our chrome extension.