12 lines
499 B
JavaScript
12 lines
499 B
JavaScript
const textarea = document.getElementById('postInput');
|
|
|
|
textarea.addEventListener('input', function () {
|
|
textarea.style.height = 'auto'; // Reset az eredeti magasságra
|
|
textarea.style.height = textarea.scrollHeight + 'px'; // Dinamikusan növeli a szövegdoboz méretét
|
|
});
|
|
|
|
function toggleComments(button) {
|
|
const commentsSection = button.closest('.card').querySelector('.comments-section');
|
|
commentsSection.style.display = commentsSection.style.display === 'none' ? 'block' : 'none';
|
|
}
|