Basic Demo

In its simplest form, Backstretch can be called by passing in the path to an image, and it will be applied to the page's body.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="jquery.backstretch.min.js"></script>
<script>
    $.backstretch("pot-holder.jpg");
</script>

Other Elements

Or, if you'd like, you can also attach Backstretch to another block level element on the page.

The background image on this element was set using Backstretch.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script src="jquery.backstretch.min.js"></script>
<script>
    $(".other").backstretch("coffee.jpg");
</script>