Last active
December 22, 2015 22:39
-
-
Save walterdavis/6541447 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
| var hiders = $$('.hider').invoke('setStyle', 'z-index: 500'); | |
| var overlay = new Element('div'); | |
| overlay.setStyle({ | |
| position: 'fixed', backgroundColor: 'rgba(0,0,0,0.7)', | |
| zIndex: '499', top:'0', left: '0', width: '100%', | |
| height: '100%', display: 'none' | |
| }); | |
| $(document.body).insert(overlay); | |
| setInterval(function(){ | |
| var visible = hiders.any(function(el){ | |
| return el.getStyle('visibility') != 'hidden'; | |
| }); | |
| overlay[visible ? 'show' : 'hide'](); | |
| }, 10); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment