$(function(){ $("#error").hide(); if($("#error > div").text() != "") { $("#error").show(); } loadGames(); }); function loadGames() { $.get("/api/v0/game/list/", function(data) { $("#games").empty(); for (var key in data) { var name = data[key]["id"]; var s = "