2022-01-08 15:56:01 -08:00
|
|
|
export function commentToggleHandler(event: Event): void {
|
|
|
|
const button = event.target as HTMLButtonElement;
|
|
|
|
const id = button.dataset.aId;
|
2023-10-14 23:23:11 -07:00
|
|
|
const answerbox = button.closest('.answerbox');
|
2022-01-08 15:56:01 -08:00
|
|
|
|
2023-10-14 23:23:11 -07:00
|
|
|
if (answerbox !== null) {
|
|
|
|
answerbox.querySelector(`#ab-comments-section-${id}`).classList.toggle('d-none');
|
|
|
|
}
|
|
|
|
}
|