jQuery Plugin To Pan Html Element within Viewport Porthole - Download jQuery Plugin To Pan Html Element within Viewport - Porthole

Download jQuery Plugin To Pan Html Element within Viewport – Porthole

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin To Pan Html Element within Viewport – Porthole, hope it will help you in programming stack.

jQuery Plugin To Pan Html Element within Viewport Porthole - Download jQuery Plugin To Pan Html Element within Viewport - Porthole
File Size: 12 KB
Views Total: 703
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Porthole is a jQuery plugin which allows the visitor to pan html elements inside a specified viewport using mouse drag or touch gestures, based on CSS3 transforms.

How to use it:

1. Add the latest version of jQuery library and the jQuery Porthole plugin to your web pages.

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

2. The html structure.

1 <div id="viewport">
2   <div class='element-to-pan'></div>
3 </div>

3. Call the function on the top element to enable the plugin.

01 $('#viewport').porthole({
02  
03   // start points
04   start : [334, 97],
05  
06   // callback function
07   callback: function() {
08     console.log('loaded');
09   }
10    
11 });

Change log:

2015-10-13

  • bugfix
  • es6 modules support

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

source : jqueryscript.net