"this.hide(); is not a function" calling a method in a class
<p>I have the following code :</p>

<pre><code>var Modal = Class.extend({
    //--- Default options
    defaults: {
        width: 300,
        height: 200
        // . . . more options
    },

    //--- Initialize the Modal class
    init: function (options) {
        //--- Extend defaults and options
        this.options = jQuery.extend(this.defaults, options);
    },

    //--- Create the Modal
    create: function () {

            // . . . code removed

            var closeButton = document.createElement("div");
            jQuery(closeButton)
                .attr({ "class": "modal_close" })
                .css({ "cursor": "pointer" })
                .live("click", function () {
                    this.closeModal();
                })
                .appendTo(modalHead);

            // . . . more code
    },

    //--- Hide the Modal
    closeModal: function () {
        // TODO : Code to hide the modal
        jQuery("#modal_container").fadeOut(200).remove();
        jQuery("#lean_overlay").fadeOut(200).remove();
    }
});
</code></pre>

<p>Now when I in the click event in the create method try to call the delete method i get this error :</p>

<pre><code>this.closeModal(); is not a function
</code></pre>

<p>what am I missing here?</p>

<p><strong>EDIT :</strong> Changed the hide function to be closeModal just to simplify my question</p>
