I use bootstrap 4 .
There is data that is loaded from the server.
There are two radio :
<div class="form-group row"> <div class="row col-6 justify-content-center"> <label class="custom-control custom-radio" style="margin: 0"> <input id="edit-user-male-1" name="gender" type="radio" value="male" class="custom-control-input"> <span class="custom-control-indicator"></span> <span class="custom-control-description">ΠΡΠΆΡΠΊΠΎΠΉ</span> </label> </div> <div class="row col-6 justify-content-center"> <label class="custom-control custom-radio" style="margin: 0"> <input id="edit-user-female-2" name="gender" type="radio" value="female" class="custom-control-input"> <span class="custom-control-indicator"></span> <span class="custom-control-description">ΠΠ΅Π½ΡΠΊΠΈΠΉ</span> </label> </div> </div> When retrieving the data, I will do either the first or second checked :
editModal.find('input.custom-control-input[name="gender"][value="'+user.genderTitle+'"]').prop('checked', true); But at the same time it is not visible visually. what is the problem?
editModalnot what you think, oruser.genderTitlenotmale/female- IgoreditModalis a modal window. In addition, I expose a bunch of data and everything is inserted normally. checkeduser.genderTitleoutput to the console that it findsjQ- that's right. - Tsyklopconsole.log(editModal.find('input.custom-control-input[name="gender"][value="'+user.genderTitle+'"]').length);- what does it do? - Igor