Adding class name to parent element when radio button is selected

Adding class to element when radio button is active.


var $radiobtn = $('.form input:radio');
$radiobtn.change(function () {
     $(this).parent().addClass('active');
});

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *