Articles, tips and tricks, news and other little things to do better our job!

lunedì, ottobre 05, 2009

Block user interface

The use of a transparent DIV is common in the Web 2.0  jQuery Block UI is a jQuery Plugin that help us with it.
It's easy to easy, to block all the page we can put this code:


$.blockUI();

and this one to remove the block:
$.unblockUI();

If we like to block/unblock all jQuery ajax request:
$().ajaxStart($.blockUI).ajaxStop($.unblockUI);
 
To block a specific element in the page, select it: 
$('div.test').block();


jQuery Block UI allows has to change the message, the color, the fadein/out effect, to open a modal dialog, the overlay color, the CSS etc.

Personally I like to use with the events beginRequest Event and endRequest Event of Asp.net Ajax.

P.S. it doesn't work well with a pages including IFRAME.

0 commenti:

Cerca nel blog

Caricamento in corso...

About This Blog

Mauro Bennici è Software Architect specializzato in .NET.

Back to TOP