Hey, So I want to know how I can check if a stream is online and if that stream is online change a html element to say where the stream is online.
Here is what I have JS
var element = document.getElementById("twtitchlive");
element.innerHTML = "We are live!"
The code looks good to me. What’s the problem?
The element is not updated I forgot to add the element info
You seem to have a typo; twtitchlive in the js vs twitchlive in the html
Yes I’ve fixed the typo but this still doesn’t work, thanks for catching that.
What are the values when you debug and step into the
if(data.streams) clause? Does the span exist when this code is running (i.e. after a document ready or this code at the end of the document)?
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.