Only register a function with an event once?
<p>I have a jQuery plugin that needs to register a click event handler:</p>

<pre><code>$.fn.myPlugin = function (options) {
    var settings = {
        // snipped
    };
    $.extend(settings, options || {});

    $("body").click(function () {
      // Do Something
    });

    // Rest of the plugin
});
</code></pre>

<p>The problem is that multiple invocations register the function more than once. Since the function needs to stay attached, I can't use .one().</p>

<p>Is there a way if a function is already attached? Can I give it a name or so? Or do I have to set some boolean flag using closure magic?</p>
