ajaxStart() "$ is not defined"
<pre><code>&lt;script src="js/jquery/jquery-1.6.js" type="text/javascript"&gt;&lt;/script&gt;
</code></pre>

<p>how can I setup ajaxStart??</p>

<p>I get "$.ajaxStart is not a function"</p>

<pre><code>function Loader(){
    this.loader = null;

    this.cnstr = function(){
        if(!this.loader){
            this.loader = DOM.div(document.body);
            with(this.loader){
                className = 'loader';
                innerHTML = 'loader';
                style.display = 'none';
            }

            elm_position_center(this.loader);
            $(this.loader).fadeIn(1000);
        }
    };

    this.dstr = function(){
        if(this.loader){
            DOM.rmv(this.loader);
        }
    };
}
var Loader = new Loader();

$.ajaxStart(function(){
    Loader.cnstr();
});

$.ajaxStop(function(){
    Loader.dstr();
});
</code></pre>

<p>EDIT:</p>

<p>$.ajaxStart is not a function</p>

<pre><code>window.onload = function(){
    $.ajaxStart(function(){
        Loader.cnstr();
    });

    $.ajaxStop(function(){
        Loader.dstr();
    });
};
</code></pre>
