[HTML] 날짜: 2025년 6월 16일 월요일 오전 11:17:44
This commit is contained in:
@@ -195,15 +195,19 @@ etUI.utils.ready(function () {
|
||||
const options = select.querySelectorAll('.option');
|
||||
const inputs = group.querySelectorAll('.component-input');
|
||||
|
||||
// 모든 input 기본 숨김
|
||||
// 모든 input 기본 숨김 (show 클래스 제거)
|
||||
inputs.forEach(input => {
|
||||
input.style.display = 'none';
|
||||
input.classList.remove('show');
|
||||
});
|
||||
|
||||
const updateVisibility = (selectedText) => {
|
||||
inputs.forEach(input => {
|
||||
const matchValue = input.getAttribute('data-option');
|
||||
input.style.display = matchValue === selectedText ? '' : 'none';
|
||||
if (matchValue === selectedText) {
|
||||
input.classList.add('show');
|
||||
} else {
|
||||
input.classList.remove('show');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user