ming yeow ming yeow - 1 year ago 90
jQuery Question

(jquery) Blackout the entire screen and highlight a section of the page?

As per screenshot below. I am pretty sure someone has done this before! =)

The circle is a bonus, would be very happy with a solution that allows highlighting of a given "div"

only part of the screen highlighted

Answer Source

See example of the following here →

No need for a plugin. This can be accomplished with very little jQuery code, showing a blackout overlay with the selected div at a z-index above it:


    $('#overlay').fadeOut(300, function(){

According to the following HTML & CSS... just add the expose class to any element you want isolated on click:

<div class="expose">Some content</div>
<textarea class="expose">Some content</textarea><br />
<input type="text" class="expose" value="Some content" /><br />
<div id="overlay"></div>

.expose {

#overlay {
    width:100%; height:100%;
    position:absolute; top:0; left:0; z-index:99998;

See example →

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download