I try to write a function with radio buttons, but for some reason the script does not work.
<input type="radio" name="test" class="input_1"> <input type="radio" name="test" class="input_2"> <span class="test_1"></span> Like this:
<script> $('input.input_1').change(function(){ if( $('.input_1').change ) { $('span.test_1').addClass('style_1'); } else { $('span.test_1').text('style_2'); } }); </script> What's my mistake?
input_1- Grundy