Answer the question
In order to leave comments, you need to log in
How to animate JS element replacement?
Hello. Can you please tell me how to animate the text replacement that occurs when clicking on the image? Those. it looks like this: https://jsfiddle.net/2oyw2yw2/ but the text in the block appears very quickly. How can it be slowed down? Thanks in advance for your reply.
<span id="review-text">тут текст</span>
<img src="/image.png" alt="текст, который проявляется при клике на картинку" onclick="document.getElementById('review-text').innerHTML = this.alt">
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question