Blockout elements with a loading message
Adds "UXLoading" to the window namespace.
Plain JS, no dependencies.
IE10+, Modern browser compatible.
UXLoading.show(selector [ , title = 'Loading', message = '' ]);
Will blockout an element and show what you specify
UXLoading.show('.ajax-component', 'Fetching data', 'Give us a sec, mate');
- selector - Mandatory. Must be a valid CSS selector
- title - Optional
- message - Optional
UXLoading.hide(selector);
UXLoading.hide('.ajax-component');
- selector - Mandatory. Must be a valid CSS selector
UXLoading.hideAll();
Hides all current messages
UXLoading.hideAll();