Skip to content

Instantly share code, notes, and snippets.

@PallCreaker
Created October 25, 2013 14:27
Show Gist options
  • Save PallCreaker/7155534 to your computer and use it in GitHub Desktop.
Save PallCreaker/7155534 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
$(document).ready(function() {
$('#story a').bind('click', function(e){
e.preventDefault();
$('#cover').css({
'position':'absolute',
'left': '0',
'top': '0',
'width': $(window).width(),
'height': $(window).height()
})
.show();
$('#turn').css({
'position':'absolute',
'left': Math.floor(($(window).width() - 400) / 2) + 'px',
'top': $(window).scrollTop() + 300 + 'px'
})
.fadeIn();
$(function(){
$('#turn').turn();
});
});
$('#cover, #turn').bind('click', function(){
$('#turn').fadeOut('slow', function(){
$('#cover').hide();
});
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment