I'm making a program that determines whether or not a Twitchtv user is currently streaming, and that offers a link to their page. The streaming portion is going fine, but nothing happens upon clicking their name. I can tell that it's a valid URL, because the page comes up if you drag the hyperlink to an empty tab, but it's still not clickable. I'm really baffled because I've done similar projects where the links are clickable without issue. Code is below, any help is appreciated.
HTML:
<div>
<section class='body'></section>
</div>
JavaScript:
$(document).ready(function() {
var members = ["ESL_SC2", "OgamingSC2", "cretetion", "freecodecamp", "storbeck", "habathcx", "RobotCaleb", "noobs2ninjas"],
body1 = $('.body'),
str = members[3],
result = str.link("https://www.twitch.tv/" + str);
$.getJSON('https://api.twitch.tv/kraken/streams/freecodecamp', function(data) {
if (data.stream === null) {
body1.append(result + ":" + "not currently streaming on Twitchtv.");
}
else body1.append(result + ":" + "currently streaming on Twitchtv.");
});
})