Created
December 14, 2010 22:16
-
-
Save jacobk/741215 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); | |
if (bg_img.size() > 0) { | |
var src = bg_img.attr("src"); | |
bg_img.hide(); | |
// Set new background on body | |
$("body").css("background", "url(" + src + ") no-repeat center center fixed") | |
.css("-webkit-background-size", "cover") | |
.css("-moz-background-size", "cover") | |
.css("-o-background-size", "cover") | |
.css("background-size", "cover"); | |
} else { | |
$("body").css("background-image", ""); | |
} | |
}); | |
}); |
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
#preso, .slide { | |
background-color: transparent !important; | |
border: none !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment