Instantly share code, notes, and snippets.

Embed
What would you like to do?
<script type="text/javascript">
jQuery(document).ready(function($) {
// Get 'body' background image and stretch it.
bg = $(document.body).css('background-image');
// Change: url("/path/to/background") to: /path/to/background
bg = bg.replace('url(','').replace(')','').replace(/"/g, '');
$(document.body).backstretch(bg);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment