The style guide provides a utility that you can use to show and hide a site mask. The mask is set to close when you click on the mask by default. The following methods are available on the site mask.
dk.siteMask.show();
dk.siteMask.hide();
dk.siteMask.toggle();
When you call a method that shows the mask it checks to see if the mask element is already on the page. If the site mask element is not on the page the script creates the element. If you would like to manually create or destroy the element. The following methods are available.
dk.siteMask.create();
dk.siteMask.destroy();
Unique Mask
If you find yourself running into conflict with other functions that are making use of the global mask. You can use the unique mask functionality provided by the global style guide. All of the same methods are available to you from the normal site mask. The benefit is a uniquely created mask with the the ID you passed as the argument.
dk.uniqueSiteMask("someUniqueString").show();
dk.uniqueSiteMask("someUniqueString").hide();
dk.uniqueSiteMask("someUniqueString").toggle();
Unique Mask (Non-Closing)
If you need a mask to not close when being clicked on by the user adding true
to the uniqueSiteMask will remove the click event listener stopping a user from removing it.
dk.uniqueSiteMask("someUniqueString", true).show();
dk.uniqueSiteMask("someUniqueString", true).hide();
dk.uniqueSiteMask("someUniqueString", true).toggle();