jQuery-Custom-Forms icon indicating copy to clipboard operation
jQuery-Custom-Forms copied to clipboard

Problem with radio type

Open ghost opened this issue 11 years ago • 2 comments

I had a problem to get input radio post. To resolve it, I modified toggleRadio function.

Replace $('input.' + className).attr('checked', false); by $('input.' + className).prop('checked', false);

And fakeElement.next('input.' + className).attr('checked', true); by fakeElement.next('input.' + className).prop('checked', 'checked');

Then it works fine, if it can help someone ;-)

ghost avatar Mar 27 '14 16:03 ghost

@JeremOnWeb could you provide me a pull request?

Thanks, anyway!

vebersol avatar Mar 27 '14 17:03 vebersol

I had a problem with a checkbox, toggling it more than 2 times was always keeping a final value of "unchecked". Changing "attr" to "prop" (as suggested by JeremOnWeb) was a good fix for the problem.

clemorphy avatar Apr 09 '14 12:04 clemorphy