Skip to content

Instantly share code, notes, and snippets.

@damiencarbery
Created October 8, 2017 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damiencarbery/0e067587053a1424e54565ca879412be to your computer and use it in GitHub Desktop.
Save damiencarbery/0e067587053a1424e54565ca879412be to your computer and use it in GitHub Desktop.
<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