Skip to content

Instantly share code, notes, and snippets.

@federomero
Created October 18, 2013 13:11
Show Gist options
  • Save federomero/7041329 to your computer and use it in GitHub Desktop.
Save federomero/7041329 to your computer and use it in GitHub Desktop.
Overlay
$(document).ready(function(){
var toggle = $('<div id="pomelo-toggle"><a href="#">&#9021;</a></div>')
toggle.css({
position: 'fixed',
'font-size': '30px',
right: '10px',
top: '10px',
'z-index': '1001',
height: '24px',
});
toggle.find('a').css({
'text-decoration': 'none',
color: '#FFF',
});
var src = 'http://federomero.uy/games_slideshow/';
var overlay = $('<div id="pomelo-overlay"><iframe width="100%" height="100%" frameborder="0" src="'+src+'"></iframe></div>')
overlay.css({
width: '100%',
height: '100%',
'background-color': '#000',
'z-index': '1000',
position: 'fixed',
display: 'none',
})
$('body').append(toggle);
$('body').append(overlay);
$("#pomelo-toggle a").click(function(){
$("#pomelo-overlay").toggle()
return false;
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment