Skip to content

Instantly share code, notes, and snippets.

@srobbin
Last active March 25, 2018 12:59
Show Gist options
  • Select an option

  • Save srobbin/1976643 to your computer and use it in GitHub Desktop.

Select an option

Save srobbin/1976643 to your computer and use it in GitHub Desktop.
Backstretch Demo: Basic
/*
* At its core, Backstretch is a one-line plugin.
* Just pass in the path to an image, and you're done.
*/
$.backstretch("images/garfield-interior.jpg");
@jamesmills
Copy link
Copy Markdown

If using this basic option I think it is worth mentioning that I had to do this

<script type="text/javascript"> $(document).ready(function() { $.backstretch("JM_v1.png"); }); </script>

@jamesmills
Copy link
Copy Markdown

<script type="text/javascript">
    $(document).ready(function() {
        $.backstretch("http://dl.dropbox.com/u/515046/www/garfield-interior.jpg");
    });
</script>

@sagarpawashe
Copy link
Copy Markdown

how to set customize width to that function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment