extending jquery issue
<p>I was reading this source code and there seems to be error. can anybody say what is happening</p>

<pre><code>var JX = {
    extend: function(bc, sc, o) {
        var f = function() {};
        f.prototype = sc.prototype;
        bc.prototype = new f();
        bc.prototype.constructor = bc;
        bc.superclass = sc.prototype;
        for (var m in o)
            bc.prototype[m] = o[m];
    }
};
JX.Component = function() {
  JX.Component.superclass.init.apply(this, arguments);
};
JX.extend(JX.Component, jQuery, {});

$(document).ready(function() {
    var mydiv = new JX.Component(document.createElement('div'));
    mydiv.text("Hello World").click(function(){alert("You Clicked Me!")});
    mydiv.appendTo(document.body);
    alert("heee");
});
</code></pre>

<p>after appendTo there is a error</p>
