[ad_1]
I want to create show input element using jquery after selected dropdown and show the input element in repeater but the problem I only show the input element in one input element, Thanks for your help.
This is html code form repeater
<tbody>
@foreach($siswas as $key => $nilai)
<tr>
<td><input type="text" class="form-control" id="nilai_sikap" name="nilai_sikap[]"></td>
</tr>
@endforeach
</tbody>
This is script to show and hide input element in id=”nilai_sikap”
$('#mapel_id').on('change', function() {
if ( this.value == 17 || this.value == 18)
$("#nilai_sikap")[$i].show();
else
$("#nilai_sikap").hide();
}).trigger("change")
From this I only get one input element like this
enter image description here
but I want show input element in every row like this
enter image description here
[ad_2]