>  yes, but the problem is i don't know what is #myDiv at the time i set
>  blockUI as default ajax action. And yes, i get the data via load().

But you know what #myDiv is when you call load.  With element blocking
you can just chain the block and load calls.

$('#myDiv').block().load('myurl', function() { $(this).unblock() });

or write a mini plugin:

$.fn.blockAndLoad = function(url) {
    return this.each(function() {
        var $this = $(this);
        $this.block().load(url, function() {
            $this.unblock();
        });
    };
};

and call it like this:

$('#myDiv').blockAndLoad(myUrl);

Reply via email to