vendredi 12 octobre 2018

Checkbox code not showing checked but it change the checked value

Hi I been struggling with this issue. I need to load the state a checkbox so I implement the next code:

$rowannex.find('.first').prop( "checked", true);
$rowannex.find('.second').attr("disabled", true);
$rowannex.find('.print').prop("checked",true);
<td class="text-center">{!! Form::radio('first', '1', false, array('class'=>'first')) !!}</td>
<td class="text-center">{!! Form::checkbox('second_costocultivoagricola_tabla_anexos', '1', false, array('class'=>'second')) !!}</td>
<td class="text-center">{!! Form::checkbox('print_costocultivoagricola_tabla_anexos', '1', false, array('class'=>'print', 'disabled')) !!}</td>

The problem is that the .prop is working, it changes the .first to checked, it changes to disabled the .second and it changes to checked the .print but this one don't show as checked.

Im using laravel and JQuery as you can see and for the css im using bootstrap. I try in Chrome, Safari and Opera without any changes. Also I try the .attr still the same issue. Sorry for the English it is not my first lenguage I hope someone knows what the problem is, thanks!




Aucun commentaire:

Enregistrer un commentaire