jQuery BlockUI Plugin

Language/jQuery 2014. 11. 20. 10:35

Overview

The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAXwithout locking the browser[1]. When activated, it will prevent user activity with the page (or part of the page) until it is deactivated. BlockUI adds elements to the DOM to give it both the appearance and behavior of blocking user interaction.

Usage is very simple; to block user activity for the page:

$.blockUI();

Blocking with a custom message:

$.blockUI({ message: '<h1><img src="busy.gif" /> Just a moment...</h1>' });

Blocking with custom style:

$.blockUI({ css: { backgroundColor: '#f00', color: '#fff'} });

To unblock the page:

$.unblockUI();

If you want to use the default settings and have the UI blocked for all ajax requests, it's as easy as this:

$(document).ajaxStart($.blockUI).ajaxStop($.unblockUI);



출처 - http://www.malsup.com/jquery/block/

'Language > jQuery' 카테고리의 다른 글

jQuery checkbox 컨트롤  (0) 2014.12.08
jQuery grid - jqGrid  (0) 2014.11.20
jquery ui plug-in  (0) 2014.11.18
jqury tools  (0) 2014.11.18
jquery timer plug-in  (0) 2014.11.18
: