Download
User Rating: 0/5 ( 0 votes)
AP image zoom is a jQuery plugin for image zoom, based on hammer.js and jquery.mousewheel
Source: github.com
1. INCLUDE CSS AND JS FILES
<link rel="stylesheet" href="css/ap-image-fullscreen.css" type="text/css" media="screen" />
<script src="js/jquery.min.js"></script>
<script src="js/hammer.min.js"></script>
<script src="js/jquery.mousewheel.min.js"></script>
<script src="js/ap-image-zoom.js"></script>
2. HTML
<img src="images/pride-w'14-3_large.jpg" width="325" height="425" alt="dirndl" id="image" />
3. JAVASCRIPT
$('#image').apImageZoom({
'cssWrapperClass': 'custom-wrapper-class',
});
4. OPTIONS
disableHammer: false,
disableMouseWheel: false,
initialSize: 'auto', // Options: 'none', 'auto', 'min', 'max'
cssWrapperClass: null,
minZoom: 0.2, // = 20%
maxZoom: 1.0, // = 100%
mouseWheelZoomSteps: 0.1, // = 10% steps
autoCenter : true, // Options: true, 'both', 'horizontal', 'vertical'
disablePan: false,
disableZoom: false,
/* TODO */
// doubleTap: 'open', 'zoom-max', 'zoom-toggle'
onBeforeSizeUpdate: undefined,
onAfterSizeUpdate: undefined,
onBeforePositionUpdate: undefined,
onAfterPositionUpdate: undefined