hmm so i tried like these (use a function) but wont work too. There are any possiblily to do this?
$('.content').on('click', function() {
//console.log(data[1].id + " - " + data[1].live + " - " + data[1].name);
console.log(live("summonersinnlive"));
});
function live(Name) {
var clientID_ = "XYZ";
var channelID = 0;
$.ajax({
method: "GET",
url: "https://api.twitch.tv/kraken/users/" + Name + "?client_id=" + clientID_,
success: function(data){
handoff(data._id);
}
});
function handoff(id)
{
channelID = id;
}
return channelID;
}