Echo.channel('score') .listen('ScoreUpdatedEvent', (e) => { var sel = "[data-team="+e.team_slug+"] [data-mission="+e.mission_slug+"]"; $(sel+" .team-icon span").text(e.score); if(e.complete) { $(sel+".team-icon").removeClass("empty"); } else { $(sel+".team-icon").addClass("empty"); } $("[data-team="+e.team_slug+"] .total.score b").text(e.team_score); console.log(e); }); setTimeout(function(){ window.location.reload(); }, 300*1000);