parent
c8dc6df16f
commit
1cba3ab59f
1 changed files with 14 additions and 0 deletions
@ -0,0 +1,14 @@ |
|||||||
|
import $ from 'jquery'; |
||||||
|
|
||||||
|
$(document).ready(function () { |
||||||
|
// Обработчик выбора пола
|
||||||
|
let genderInput = $('#gender') |
||||||
|
|
||||||
|
$('div.js-select-option[data-gender-option]').on('click', function (e) { |
||||||
|
e.preventDefault(); |
||||||
|
const currentGender = $(this).attr('data-gender'); |
||||||
|
$('[data-gender]').removeClass('active'); |
||||||
|
$(`[data-gender=${currentGender}]`).addClass('active'); |
||||||
|
genderInput.val(currentGender) |
||||||
|
}); |
||||||
|
}) |
||||||
Loading…
Reference in new issue