how can I allow the user to click only 3 times on a button in jquery?
<p>I'm trying to make a little rock paper scissors game. for that I've written a small javascript in jquery. the whole thing should work like this: user presses button, an ajax event is fired, the selected option is added to a div and a counter increments. but only 3 times! I can't figure it out to work like this... here's my code</p>

<pre><code>if (counter &lt;= 3){
    $('.buStein1').click(function(event){
        $.post("game.php", { uid: "&lt;?php echo $user['id']?&gt;", choice: "stein", runde: counter  });
        $('#choiceContainer').append(stein);
        counter++;
      });
    $('.buSchere1').click(function(event){
        $.post("game.php", { uid: "&lt;?php echo $user['id']?&gt;", choice: "schere", runde: counter  });
        $('#choiceContainer').append(schere);
        counter++;
      });
    $('.buPapier1').click(function(event){
        $.post("game.php", { uid: "&lt;?php echo $user['id']?&gt;", choice: "papier", runde: counter  });
        $('#choiceContainer').append(papier);
        counter++;
      });
}
else {
    $('#choiceContainer').text('no clicking possible');
}
</code></pre>
