function ShowCharData(action, id) { $.ajax({ url: "game.php?showCharData=" + id + "&dataAction=" + action, type: "GET", success: function(data) { $("#charData").html(""); $("#charData").append(data); } }); } function ShowCharDetails(id, hidden = 0, convert = 0) { $.ajax({ url: "game.php?showChar=" + id + "&hidden=" + hidden + "&convert=" + convert, type: "GET", success: function(data) { $("#panelPostaci").html(""); $("#panelPostaci").append(data); } }); } function ChangeSkins(sex) { if (sex == 1) { $("#sexMale").prop("checked", true); $("#maleSkins").css("display", "block"); $("#femaleSkins").css("display", "none"); } else { $("#sexFemale").prop("checked", true); $("#maleSkins").css("display", "none"); $("#femaleSkins").css("display", "block"); } } function SelectSkin(id) { if(document.getElementById("skin").value != id) { document.getElementById("skin").value = id; $(document).find(".panelSkinSelect").each(function() { $(this).css("opacity", "0.4"); }); $("#" + id).css("opacity", "1"); } else { document.getElementById("skin").value = -1; $(document).find(".panelSkinSelect").each(function() { $(this).css("opacity", "1.0"); }); } } function Validate(event) { if (document.getElementById("skin").value == -1) { event.preventDefault(); location.href = "#skins"; return false; } } $('a.open-modal').click(function(event) { var modalSelector = $(this).attr('data-selector'); event.preventDefault(); $(modalSelector).modal({ fadeDuration: 250, keepelement: true }); return false; });