add an extra div to cover the content. The mask should be placed on top of all elements except the control that should be displayed. Using the following jquery code, this function can be achieved. Assuming the added control (div) has id = 'mask'
......... var maskHeight = $(document).height(); var maskWidth = $(window).width(); //Set heigth and width to mask to fill up the whole screen $('#mask').css({'width':maskWidth,'height':maskHeight}); //transition effect $('#mask').fadeIn(1000); $('#mask').fadeTo("slow",0.5); ......
source share