javascript - JS code does not work on mobile -


i have following code

$('.checkbox.radio-info input[type="checkbox"]').change(function() {     if ($(this).parent().parent().find('input[type="checkbox"]:checked').length > 1)     {         $(".checkbox.radio-info input[type='checkbox'").prop('checked', false);         $(this).prop('checked', true);     } }); 

this works expected on desktop, however, on iphone (ios 9, chrome) doesn't work. not uncheck checkbox when check one.

is there in code device related?

it seems missing "]" in line: $(".checkbox.radio-info input[type='checkbox'").attr('checked', false);

maybe desktop browser more forgiving?

if doesn't help, please share html well.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -