Skip to content

Instantly share code, notes, and snippets.

@walterdavis
Last active December 22, 2015 22:39
Show Gist options
  • Select an option

  • Save walterdavis/6541447 to your computer and use it in GitHub Desktop.

Select an option

Save walterdavis/6541447 to your computer and use it in GitHub Desktop.
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