jQuery Plugin For Stretching Image - fitpic.js

File Size: 4.42KB
Views Total: 1308
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
jQuery Plugin For Stretching Image - fitpic.js

fitpic.js is a jQuery plugin that make it easy to stretch images on your page to fit your visitors viewports perfectly when loading or resizing.

How to use it:

1.  Add a image to your page

<img src="demo.jpg" class='bg'> 

2. Include jQuery library and fitpic.js in your page

<script src='http://code.jquery.com/jquery-1.9.1.min.js'></script> 
<script src='jquery.fitpic.js'></script> 

3. Call the plugin

<script>
    $(window).on('load resize', function(){
          $('.bg').fitPic();
     });
</script>

Change Log:

v0.0.5 (2013-07-03)

  • removed the settimeout and updated plugin-json

v0.0.4 (2013-04-02)

  • fixed settimeout ie.js

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