Why does the button disappear when I click on it, but the status refreshes?
Javascript
$( ".refreshstatus" ).click(function(){
$( ".navplayers" ).load('stats.php');
});
CSS
.refreshstatus{
font-family:'Noto Sans';
font-weight: 900;
text-align:center;
background-color:tomato;
}
HTML
<div class="refreshstatus">Refresh</div>
stats.php
<?php include ("statsfunction.php"); ?><?php if( ( $Players = $Query->GetPlayers( ) ) !== false ): foreach( $Players as $Player ): ?>
<img src="https://minotar.net/avatar/<?php echo htmlspecialchars( $Player ); ?>/32"><div class="playerinfo" id="<?php echo htmlspecialchars( $Player ); ?>"><?php echo htmlspecialchars( $Player ); ?></div></img>
<?php endforeach; else: ?>
No players
<?php endif; ?>
<p><b>Players <?php echo "<font color='green' ><?php $players_online ?></font>" ?> online</b></p>
<div class="col-sm-3 navplayers">
<?php include ("stats.php"); ?>
<div class="refreshstatus">Refresh</div>
</div>