I've looked at a lot of posts, but unfortunately my knowledge of JS is fairly low. Ok, extremely low. I am pretty decent with CSS and HTML, though. So my issue is this:
I'm using the awesome typed.js element (https://github.com/mattboldt/typed.js/)
HTML I'm using for it is here:
<h1 style="color:#000;" class="nk-title">The perfect
<span class="db hidden-sm-up"></span>
<span style="color:#000;" class="nk-typed">
<span> ^1000 birthday gift.</span>
<span> ^1000 business jingle.</span>
<span> ^1000 marketing idea.</span>
<span> ^1000 love dedication.</span>
<span> ^1000 event promo.</span>
</span>
This creates a cool typing feature (check it out at druvocals.com/1 to see)
The ^1000 delays the text from typing and puts an animated blinking cursor. So the ^1000 doesn't actually show up on the page. It gives it a realistic typing pause.
But what's happening on slower connections, is that the first line (^1000 birthday gifts) seems to be showing as is, with the ^1000 displayed on the page, before the JS fully loads. So on slower connections, the page will first show as "The perfect ^1000 birthday gift" before kicking back and displaying it correctly.
From my searching here on Stackoverflow, I believe I need to be heading toward the direction of a .load function, correct? I don't want to hide the entire body until JS is fully loaded; just this one area.
Or could I possibly wrap that entire HTML in a separate div, and somehow hide the div until the typed.js file is completely loaded/rendered?