jQuery Plugin To Scale Images To Full Window - fullBleed

jQuery Plugin To Scale Images To Full Window - fullBleed
File Size: 247 KB
Views Total: 559
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

fullBleed is a small and cross-browser jQuery plugin that scales / stretches / resizes your images to fit in the browser window while maintaining aspect ratio. Supports both modern browsers using CSS3 'background-size: cover' property and even IE 7/8/9 using JavaScript to do the scaling.

How to use it:

1. Import jQuery library and the jQuery fullBleed plugin at the bottom of the document so the page loads faster.

<script src="jquery.min.js"></script>
<script src="jquery.fullbleed.js"></script>

2. Just call the plugin on the img tag and we're done.

$('img').fullBleed();

3. Possible plugin options.

$('img').fullBleed({

  // set the alignment of the image
  align: 'center center',

  // additional CSS class
  className: ''
  
});

This awesome jQuery plugin is developed by bryanbuchanan. For more Advanced Usages, please check the demo page or visit the official website.