Hide/Show Text/Image w/ Javascript/HTML

timer Asked: Jun 10th, 2013
account_balance_wallet $5

Question 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.
If the channel is live, it will display something like:


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


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.

Tutor Answer

School: UT Austin

Ok, you can't really determine they are live or not by testing out the code. Why not just use the same API to test it's > or = []? You've been using this to determine it's [] or [codes] anyway.

flag Report DMCA

Tutor went the extra mile to help me with this essay. Citations were a bit shaky but I appreciated how well he handled APA styles and how ok he was to change them even though I didnt specify. Got a B+ which is believable and acceptable.

Similar Questions
Hot Questions
Related Tags
Study Guides

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors