Backstretch – add full-sized background image


This plugin allows you to add big images as background for a page, it resize it to fit the page and will automatically resize as the window size changes. To avoid the waiting for the background to load and then to use the site, this plugin fetches the background image after the page is loaded.

How to use:

This plugin doesn’t require some specific markup. You just include the jquery.min.js file and the jquery.backstretch.min.js one, and then fire the plugin with the following line:

<script type="text/javascript">
  $.backstretch("april-cherry.jpg");
</script>

Other uses:

  • you can attach Backstretch to a click event: change the background image when some element is clicked
  • use Backstreched in a slideshow: add several images and create a slideshow as background

Demo Download

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s