Created
February 5, 2014 02:35
-
-
Save fritids/8816546 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function() { | |
| // create a <div> to hold the overlay styles ... | |
| $("body").append("<div id='overlay'></div>"); | |
| // get the height of the document ... | |
| var docHeight = $(document).height(); | |
| // add some styling to the overlay. | |
| $("#overlay") | |
| .height(docHeight) | |
| .css({ | |
| 'top': 0, | |
| 'left': 0, | |
| 'width': '100%', | |
| 'position': 'fixed', | |
| 'background-color': 'black', | |
| 'opacity' : 0.1, | |
| 'z-index': 5000 | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment