Files
ConnectHub/js/post.js
2024-09-25 20:49:15 +02:00

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';
}