Simple Image Viewer Plugin With jQuery CSS3 Canvas ImageTrans js - Download Simple Image Viewer Plugin With jQuery, CSS3 And Canvas - ImageTrans.js

Download Simple Image Viewer Plugin With jQuery, CSS3 And Canvas – ImageTrans.js

Posted on

This time I will share jQuery Plugin and tutorial about Simple Image Viewer Plugin With jQuery, CSS3 And Canvas – ImageTrans.js, hope it will help you in programming stack.

Simple Image Viewer Plugin With jQuery CSS3 Canvas ImageTrans js - Download Simple Image Viewer Plugin With jQuery, CSS3 And Canvas - ImageTrans.js
File Size: 9.76 KB
Views Total: 2139
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

ImageTrans.js is a simple jQuery plugin that displays any pics in an image viewer interface with zooming, flipping and rotating features. Heavily based on HTML5 canvas and CSS3 3D transforms.

How to use it:

1. Add references to jQuery library and the jQuery ImageTrans.js script as follow:

1 <script src="//code.jquery.com/jquery.min.js"></script>
2 <script src="src/jQuery.ImageTrans.js"></script>

2. Create a container for the image viewer.

1 <div id="idContainer"> </div>

3. Initialize the image viewer with default options.

1 var it = $("#idContainer").ImageTrans();

4. Load a specified image to the image viewer.

1 it.load(imgSrc);

5. Rotate the image.

1 it.left();
2 it.right();

6. Flip the image.

1 it.vertical();
2 it.horizontal();

7. Zoom in/out the image.

1 it.zoomout();
2 it.zoomin();

8. Reset the image.

1 it.rest();

9. Default configuration options.

1 var it = $("#idContainer").ImageTrans({
2   mode: "css3|filter|canvas",
3   zoom: .1,
4   onPreLoad: function () { },
5   onLoad: function () { },
6   onError: function (err) { }
7 });

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

source : jqueryscript.net