There is a code:
$('.js-radio').click(function(){ var active = 'form__radio--active'; $(this).addClass(active); $('.js-radio').parents('.js-radio--block').find('.js-radio').not(this).removeClass(active); }); How to restrict his work outside the '.js-radio--block' ?
If there is only one such block on the page, then there are no problems. If multiple, it does not work correctly. The principle of operation is required <input type="radio">
Thank you in advance!
$(this).parents. but for now this is speculation - splash58$(this).parent('.js-radio--block')Why are all parents? or evenclosest('.js-radio--block')- Jean-Claude