Finals
This commit is contained in:
11
js/post.js
Normal file
11
js/post.js
Normal file
@ -0,0 +1,11 @@
|
||||
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';
|
||||
}
|
Reference in New Issue
Block a user