I've got a basic question to you. I'm creating several js scripts, like this:
<script>
$('#mapveto1').click(function() {
$('#mapveto1').addClass('banned');
$('#map1').text('cobblestone has been banned');
<? $remaining = $remaining -1; ?>
$('#banstatus').html('<span class="glyphicon glyphicon-repeat glyphicon-repeat-animate"></span> Maps are being banned <? echo $remaining; ?>');
});
</script>
In every script, the id of element is being changed. As you can see, there are some PHP variables in it.
The thing is, these php lines are being executed always, even when I don't run this script by clicking on the element. How can I make php scripts which will be executed ONLY when a js script is?