dimmr

A jQuery plugin to dim the current page once the top of a specific element has crossed the halfway point of the viewport.

USE:

$('#target').dimmr();

OPTIONS (and defaults):

animationSpeed: 600
How long it takes (in milliseconds) to fade overlay in/out

opacity: 0.8
How opaque the overlay will be

zIndex: 1
The z-index of the overlay

NOTES:

Make sure to set the z-index of any element you'd like to appear on top of the overlay.

Peep the script on GitHub
Back to stephenwidom.com