function setAchievement(idAchievement){ $.ajax({ url: "http://localhost:8080/licenta/setAchievement", data:{"idAchievement":idAchievement} }).then(function(data) { if (data.description != "null"){ // if update was made $("#description").text(data.description); // set the divs with infos received about the achievement $("#xp-gained").text(data.xpGained); } }); $("#achievementsModal").modal("show"); // display the modal $( "#continue" ).click(function() { // close the modal when the continue button is clicked $("#achievementsModal").modal("hide"); }); }
setAchievement(0);
setAchievement(0); setAchievement(1); setAchievement(2);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)