Javascript repetition of events
<p>If the focus is on the input was only one time it works but if more then attached event begins to work as many times as eliment was in focus. How to make a click event to execute only once? Below is the code.</p>

<pre><code>$('.menuName').focusin(function(){  

        $(this).parent().append('&lt;div class="cleartext" style="position: absolute;right: 0px;top: 0px;height: 38px;width:32px;z-index: 999;"&gt;&lt;i class="icon-remove-circle"&gt;&lt;/i&gt;&lt;/div&gt;');

        inputclr = $(this);
        intutval = $(inputclr).val();

        $(document).on('click', '.cleartext', function() {

            $('.menuName').placeholder();
                $(inputclr).attr('placeholder',intutval);
            $('.pinch_text').html('click');
            $(inputclr).val('').focus();

        });
    });
</code></pre>
