I am diving into the world of jQuery for the first time. Even though I'm taking an online class on it, using it in a website is completely new to me.
My aim for the homepage is to have "Hello there" appear for 2 seconds, then fade out and be replaced by "Your partner in digital" which should stay visible permanently.
I've been experimenting with different approaches to achieve this effect, but I seem to be facing a few issues: 1) Currently, both phrases appear initially, followed by "Hello there" fading out slowly while "Your partner in digital" fades in gradually - I want "Hello there" to quickly show up and then fade away. 2) I want "Your partner in digital" to remain visible without any fading once it appears.
jQuery(document).ready(function(){
$(".hellothere").fadeOut(4500,function(){
$(".partner").fadeIn(10000);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<h1 class="hellothere"><span class="font-168856 font-444086" style="font-size: 65px; text-transform: uppercase;">Hello there.</span></h1>
<h1 class="partner"><span class="font-168856 font-444086" style="font-size: 65px; text-transform: uppercase;">Your partner in digital.</span></h1>
When I removed this section:
function(){
$(".partner").fadeOut(4500);
It caused the entire sequence to malfunction (I was attempting to prevent the fading out).
Any pointers or suggestions would be greatly appreciated. Thank you!