Add and remove a marker character on click()
<p>I want to add a marker character to a link when the user clicks it, and remove it when he clicks it a second time.</p>

<p>Here's what I have :</p>

<pre><code>$('#text a').click(function () {
    $(this).addClass('clicked');
    $(this).text(markerTextChar +  $(this).text());
    $(this).click(function () {
        $(this).removeClass('clicked');
        $(this).text($(this).text().substring(1));
    });
});
</code></pre>

<p>The marker is added on click, but it is added one more time when I click it to deselect it.</p>

<p>Can you help me fix that ?</p>
