Why jquery click each time an increasing value of?
<p>After each toggle <code>$(".pages a").click (function () {};</code> adding text box, an increasing number of. If you toggle the condition runs three times, adding an extra three link. What is the solution? My jquery code has the following structure: </p>

<p>Note: <code>if (go=="page") {}</code> required to use in</p>

<pre><code>$(document).ready(function() {

    $.page = {

        come: function(go) {
            var links = $("textarea[name=links]");
            if(go == "page") {

                $('.pages').toggle();

                $('.pages span').click(function() {
                    $('.pages').hide();
                });

                $(".pages a").click(function() {

                    var pg = $(this).attr('href');
                    var links2 = $(links).val();
                    $(links).val(links2 + pg);

                });
            }
        }

    }

});
</code></pre>
