jQuery Plugin For Responsive Image with Focus Area Responsify js - Download jQuery Plugin For Responsive Image with Focus Area - Responsify.js

Download jQuery Plugin For Responsive Image with Focus Area – Responsify.js

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin For Responsive Image with Focus Area – Responsify.js, hope it will help you in programming stack.

jQuery Plugin For Responsive Image with Focus Area Responsify js - Download jQuery Plugin For Responsive Image with Focus Area - Responsify.js
File Size: 26.2 MB
Views Total: 753
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   



Responsify.js is a smart jQuery responsive image solution which allows you to define a focus area on an image and make it always be visible in the viewport when window resizing.

How to use it:

1. Load the jQuery responsify.js plugin after loading jQuery JavaScript library. Put the following snippets at the bottom of the webpage.

1 <script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
2 <script src="responsify.js"></script>

2. Insert an image into the webpage and define a focus area using html5 data-focus-* attributes as follow.

1 <img src="1.png" alt=""
2      data-focus-left=".15"
3      data-focus-top=".12"
4      data-focus-right=".79"
5      data-focus-bottom=".66"
6 >

3. Initialize the plugin on window load and window resize events.

1 $(window).load(function() {
2   $('img').responsify();
3 });
4  
5 $(window).resize(function(){
6   $('img').responsify();
7 })

Change log:

2015-12-04

  • fixed typo in owidth variable declaration

2015-11-28

  • add $(this) selector cached & small format tweaks

2015-11-27

  • fix bugs.

2015-11-26

  • add the focus area app

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




source : jqueryscript.net