How to add callback function in js?
<pre><code>function $(id) {
    if (id) {
        if (window === this) {
            return new $(id);
        }

        this.e = document.getElementById(id);
        return this;
    } else {
        return about;
    }
}

$.prototype = {
    click: function () {
        this.e.onclick = function () {
            alert("hi..");
        }
    }
};
</code></pre>

<p>when I excute this code : </p>

<pre><code>$("skg").click2();
</code></pre>

<p>it return alert msg.</p>

<p>But I want to add a callback function like this : </p>

<pre><code>$("skg").click(function(){
    alert("hi SKG");
});
</code></pre>

<p>How to do this?</p>
