-
-
Save wallin/916420 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() { | |
$('div.content').live('showoff:show', function(evt) { | |
var bg_img = $('img[alt=background]', evt.target); | |
var old_bg = ''; | |
if (bg_img.size() > 0) { | |
var src = bg_img.attr('src'); | |
bg_img.hide(); | |
// Set new background on body | |
old_bg = $('body').css('background-image'); | |
$('body') | |
.css('background-image', 'url(' + src + ')') | |
.addClass('fullScreen'); | |
} else { | |
$('body').css('background-image', old_bg).removeClass('fullScreen'); | |
} | |
}); | |
}); |
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
body.fullScreen { | |
background-repeat: no-repeat; | |
background-position: center center; | |
background-attachment: fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} | |
#preso, .slide { | |
border: none !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment