jsUtils.lock()
Locks the screen with an absolute div.
jsUtils.lock( opacity, lockOnClick )
opacity - opacity of the div that is used for the locking of the screen
lockOnClick - JavaScript function to be called when user clicks on the locking div
Returns null
This function will put an absolute div on top of all elements on the screen with defined opacity. The background color of the div is black.
The div on top is registered as window.screenLock variable and you can use it to add additional functionality.
Example
<!DOCTYPE html>
<html>
<head>
<script src="system/libs/jsUtils.js" type="text/javascript"></script>
<script type="text/javascript">
window.onload = function() {
jsUtils.lock(0.4, function() {
jsUtils.unlock();
});
}
</script>
<body>
</body>
</html>
See Also