jQuery - after()-function fires twice
<p>This is my code snippet:</p>

<pre><code>$.ctrl('J', function() {

    $("#"+currentId).after('&lt;div contentEditable="true"&gt;test&lt;/div&gt;'); 

});
</code></pre>

<p>After running it, 2 divs with "test" will be added instead of 1.</p>

<p>What am I missing?</p>

<p>This is the CTRL function:</p>

<pre><code>$.ctrl = function(key, callback, args) {

    var isCtrl = false;

    $(document).keydown(function(e) {
        if (!args) args = [];
        if (e.ctrlKey) isCtrl = true;
        if (e.keyCode == key.charCodeAt(0) &amp;&amp; isCtrl) {
            callback.apply(this, args);
            return false;
        }
    }).keyup(function(e) {
        if (e.ctrlKey) isCtrl = false;
    });
};
</code></pre>

<p>Thank you in advance.</p>

<p>Greetings</p>

<p>Edit:</p>

<p>maybe it has something to do with this:</p>

<pre><code>$('div[id|="edid"]').focus(function() {


       $('div[id|="edid"]').removeClass('onFocus'); 

       $(this).addClass('onFocus'); 

       var currentId = $(this).attr('id');
});
</code></pre>
