- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Display content based on current text
Hi guys. I’ve got a little project I’ve been practicing on to get better at larger JS projects and I’ve run into a little bug I’d like to ask about. The idea here was to fade in text in a setInterval function, and it works great. However, depending on what this text says, I would like to show and hide different content. This will happen each time the setInterval function fires. In theory this sounded like a legit solution, but if you look at the fiddle it appears to be a complete dumpster fire. What am I doing wrong here? Is this the best way to achieve what I’m after? Sorry if this seems like a complete noob question, but any input is always helpful. Thanks for your time.
However, depending on what this text says, I would like to show and hide different content.
Where would the text be coming from?
How would it change…will it change?
I’m confused about a use case for this….
You mean a bit like this?
The fading would require a loop (I think)…my JQ is at a RTFM then C&P level.
Text(ish) version to show that inner text is selectable and capable of being used as a variable.