On Tue, Apr 8, 2008 at 9:42 AM, Alexandre Plennevaux <[EMAIL PROTECTED]> wrote: > > hi again! > > i understand from the blockUI doc that using this super simple call, i > can default all ajax calls to use blockUI. > > $().ajaxStart($.blockUI).ajaxStop($.unblockUI); > > > Yet, i would like to know if it would be possible for the default > behaivour to block the related element (that will receive the fetched > data), instead of blocking the whole page, so something like > > $().ajaxStart($.block).ajaxStop($.unblock); > > I tried that and it didn't work. Also tried this: > > blockMe = function(){ > $(this).block({ > message: '<h1>Aaaaaargl, I\'m being blocked!!!!</h1>' > }); > } > unBlockMe = function(){ > $(this).unblock(); > } > $().ajaxStart(blockMe).ajaxStop(unBlockMe); > > but no luck either . It's probably not that simple ... > > Thanks for your attention !
Change this line: > $(this).block({ How are you getting the data? If you're using load then this should work: $('#myDiv').block().load('myurl', function() { $(this).unblock() }); Mike