ok i got your point: i was just being lazy going through 15 files
changing all load() calls, but i'll do it. hey, at least i didn't have
to make the plugin :)



On Tue, Apr 8, 2008 at 5:30 PM, Mike Alsup <[EMAIL PROTECTED]> wrote:
>
>  >  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);
>



-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com

Reply via email to