Hide/Show Text/Image w/ Javascript/HTML

User Generated

FrrvatOyhr

Programming

Description

I don't know if this can be done. I imagine it's pretty simple. I just don't know enough about Javascript to build it correctly.

I have an Enjin.com site. They allow me to use HTML modules with Javascript enabled. What I am trying to do is display whether a Twitch.tv streamer is broadcasting(Live) or not. Twitch has APIs you can use to check.
http://api.justin.tv/api/stream/list...annel=defatank
If the channel is live, it will display something like:

Code:

[{"broadcast_part": 1, "featured": false, "channel_subscription": false,...etc.
If they are not live it will simply display

Code:

[]
Javascript needs to check that API URL, determine whether the content is > or = "[]", then display or hide some text or image based on that. How can I do this?

Thank you for your help.

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Related Tags