I am currently trying to implement a fade-in effect on text in WordPress when another text line is clicked. I want the transition to be smooth and appealing, similar to a button.
Despite my efforts, the method I found online does not seem to work correctly within the WordPress platform. Here is the code snippet I attempted to use:
Here is the HTML structure:
<span class="button">Text button</span>
<span class="fadein">You just clicked on "Text button"</span>
And here is the CSS styling:
.button { cursor: pointer; }
Finally, the Jquery script:
$('.fadein').hide();
$('.button').on('click', function(){
$('.fadein').fadeIn(2000);
});