Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dynamicdriverepo/featuredimagezoomer
https://github.com/dynamicdriverepo/featuredimagezoomer
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/dynamicdriverepo/featuredimagezoomer
- Owner: dynamicdriverepo
- Created: 2013-02-01T00:22:05.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2022-11-02T13:01:36.000Z (about 2 years ago)
- Last Synced: 2023-04-06T14:06:56.742Z (over 1 year ago)
- Language: JavaScript
- Size: 1.19 MB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Featured Image Zoomer #
*Description:* This script lets you view a magnified portion of any image upon moving your mouse over it. A magnifying area appears alongside the image displaying the magnified image on demand. The user can toggle the zoom level by using the mousewheel. It's great to use on product images, photos, or other images with lots of details you want users to be able to get into on command.
## Directions ##
*Step 1:* This script uses the following external files:
+ jQuery 1.7 or above (served via Google CDN)
+ multizoom.js
+ multizoom.css*Step 2:* Add the below code to the HEAD section of your page:
// Featured Image Zoomer (w/ optional multizoom and adjustable power)- By Dynamic Drive DHTML code library (www.dynamicdrive.com)
// Multi-Zoom code (c)2012 John Davenport Scheuer
// as first seen in http://www.dynamicdrive.com/forums/
// username: jscheuer1 - This Notice Must Remain for Legal Use
// Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
jQuery(document).ready(function($){
$('#image1').addimagezoom({ // single image zoom
zoomrange: [3, 10],
magnifiersize: [300,300],
magnifierpos: 'right',
cursorshade: true,
largeimage: 'hayden.jpg' //<-- No comma after last option!
})
$('#image2').addimagezoom() // single image zoom with default options
$('#multizoom1').addimagezoom({ // multi-zoom: options same as for previous Featured Image Zoomer's addimagezoom unless noted as '- new'
descArea: '#description', // description selector (optional - but required if descriptions are used) - new
speed: 1500, // duration of fade in for new zoomable images (in milliseconds, optional) - new
descpos: true, // if set to true - description position follows image position at a set distance, defaults to false (optional) - new
imagevertcenter: true, // zoomable image centers vertically in its container (optional) - new
magvertcenter: true, // magnified area centers vertically in relation to the zoomable image (optional) - new
zoomrange: [3, 10],
magnifiersize: [250,250],
magnifierpos: 'right',
cursorshadecolor: '#fdffd5',
cursorshade: true //<-- No comma after last option!
});
$('#multizoom2').addimagezoom({ // multi-zoom: options same as for previous Featured Image Zoomer's addimagezoom unless noted as '- new'
descArea: '#description2', // description selector (optional - but required if descriptions are used) - new
disablewheel: true // even without variable zoom, mousewheel will not shift image position while mouse is over image (optional) - new
//^-- No comma after last option!
});
})
*Step 3:* Then, add the below sample markup to your page:
Demo 1:
Demo 2:
Demo 3:
Milla Jojovitch
Demo 4:
Angelina Jolie
## Featured Image Zoomer set up ##
See script project page for additional details on setup and documentation: