diff --git a/demo/api.html b/demo/api.html new file mode 100644 index 0000000..7e4e882 --- /dev/null +++ b/demo/api.html @@ -0,0 +1,233 @@ +
These are the available options for the zoom
+ +See some examples of usage on our examples page +
+ + +Option | +Default Value | +Desciption | +
---|---|---|
responsive | +false | +Set to true to activate responsivenes. If you have a theme which changes size, or tablets which
+ change orientation this is needed to be on. Possible Values: "True" ,
+ "False" |
+
scrollZoom | +false | +Set to true to activate zoom on mouse scroll. Possible Values: "True" , "False"
+ |
+
imageCrossfade | +false | +Set to true to activate simultaneous crossfade of images on gallery change. Possible Values:
+ "True" , "False" |
+
loadingIcon | +false | +Set to the url of the spinner icon to activate, e.g, http://www.example.com/spinner.gif.
+ Possible Values: "True" , "False" |
+
easing | +false | +Set to true to activate easing. Possible Values: "True" , "False" |
+
easingType | +zoomdefault | +default easing type is easeOutExpo, (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b |
+
easingDuration | +2000 | ++ |
lensSize | +200 | +used when zoomType set to lens, when zoom type is set to window, then the lens size is auto + calculated + | +
zoomWindowWidth | +400 | +Width of the zoomWindow (Note: zoomType must be "window") | +
zoomWindowHeight | +400 | +Height of the zoomWindow (Note: zoomType must be "window") | +
zoomWindowOffetx | +0 | +x-axis offset of the zoom window | +
zoomWindowOffety | +0 | +y-axis offset of the zoom window | +
zoomWindowPosition | +1 | +Once positioned, use zoomWindowOffsetx and zoomWindowOffsety to adjust+ Possible values: 1-16 + |
+
lensFadeIn | +false | +Set as a number e.g 200 for speed of Lens fadeIn | +
lensFadeOut | +false | +Set as a number e.g 200 for speed of Lens fadeOut | +
zoomWindowFadeIn | +false | +Set as a number e.g 200 for speed of Window fadeIn | +
zoomWindowFadeOut | +false | +Set as a number e.g 200 for speed of Window fadeOut | +
zoomTintFadeIn | +false | +Set as a number e.g 200 for speed of Tint fadeIn | +
zoomTintFadeOut | +false | +Set as a number e.g 200 for speed of Tint fadeOut | +
borderSize | +4 | +Border Size of the ZoomBox - Must be set here as border taken into account for plugin + calculations + | +
zoomLens | +true | +set to false to hide the Lens | +
borderColour | +#888 | +Border Colour | +
lensBorder | +1 | +Width in pixels of the lens border | +
lensShape | +square | +can also be round (note that only modern browsers support round, will default to square in older + browsers) + | +
zoomType | +window | +Possible Values: Lens, Window, Inner | +
containLensZoom | +false | +for use with the Lens Zoom Type. This makes sure the lens does not fall outside the outside of + the image + | +
lensColour | +white | +colour of the lens background | +
lensOpacity | +0.4 |
+ used in combination with lensColour to make the lens see through. When using tint, this is + overrided to 0 + | +
lenszoom | +false | ++ |
tint | +false | +enable a tint overlay, other options: true | +
tintColour | +#333 | +colour of the tint, can be #hex, word (red, blue), or rgb(x, x, x) | +
tintOpacity | +0.4 | +opacity of the tint | +
gallery | +null | +This assigns a set of gallery links to the zoom image | +
cursor | +default | +The default cursor is usually the arrow, if using a lightbox, then set the cursor to pointer so + it looks clickable - Options are default, cursor, crosshair + | +
+ + + + +
The zoom works with either one or two images. Two images are recommended for the zoom to work + the + best. + Most of the settings for the zoom box can be overridden. +
+ SHOW THE CODE +<img id="zoom_01" src="small/image1.png"
+ data-zoom-image="large/image1.jpg"/>
+ $("#zoom_01").ezPlus();
+ + You can easily set tints for the zoom, you can set the colour and opacity of the tint + overlay to + be any value + +
<img id="zoom_02" src="small/image1.png"
+ data-zoom-image="large/image1.jpg"/>
+ $("#zoom_02").ezPlus({tint:true,
+ tintColour:'#F90', tintOpacity:0.5});
+
+ You can attach a set of images to the zoom.
+ Also you can pass a gallery to the lightbox
+
+ NEW: The imageCrossfade option will give a simultaneous fadein / fadeout effect
+ on
+ the zoom.
+
<img id="img_01" src="small/image1.jpg" data-zoom-image="large/image1.jpg"/>
+
+ <div id="gal1">
+
+ <a href="#" data-image="small/image1.jpg" data-zoom-image="large/image1.jpg">
+ <img id="img_01" src="thumb/image1.jpg" />
+ </a>
+
+ <a href="#" data-image="small/image2.jpg" data-zoom-image="large/image2.jpg">
+ <img id="img_01" src="thumb/image2.jpg" />
+ </a>
+
+ <a href="#" data-image="small/image3.jpg" data-zoom-image="large/image3.jpg">
+ <img id="img_01" src="thumb/image3.jpg" />
+ </a>
+
+ <a href="#" data-image="small/image4.jpg" data-zoom-image="large/image4.jpg">
+ <img id="img_01" src="thumb/image4.jpg" />
+ </a>
+
+ </div>
+ //initiate the plugin and pass the id of the div containing gallery images
+ $("#zoom_03").ezPlus({gallery:'gallery_01', cursor: 'pointer', galleryActiveClass: 'active',
+ imageCrossfade: true, loadingIcon: 'http://www.elevateweb.co.uk/spinner.gif'});
+
+ //pass the images to Fancybox
+ $("#zoom_03").bind("click", function(e) {
+ var ez = $('#zoom_03').data('ezPlus');
+ $.fancyboxPlus(ez.getGalleryList());
+ return false;
+ });
+ /*set a border on the images to prevent shifting*/
+ #gallery_01 img{border:2px solid white;}
+
+ /*Change the colour*/
+ .active img{border:2px solid #333 !important;}
+
+ Positioning the window can be done in by setting a default position, and then using x and y
+ offset
+ to adjust
+
+
You can also position the window into a container
+
<img id="zoom_04a" src="small/image1.png" data-zoom-image="large/image1.jpg"/>
+ <img id="zoom_04b" src="small/image1.png" data-zoom-image="large/image1.jpg"/>
+ <img id="zoom_04c" src="small/image1.png" data-zoom-image="large/image1.jpg"/>
+ <img id="zoom_04" src="small/image1.png"
+ data-zoom-image="large/image1.jpg"/>
+ $("#zoom_04a").ezPlus({zoomWindowPosition: 1});
+ $("#zoom_04b").ezPlus({zoomWindowPosition: 12});
+ $("#zoom_04c").ezPlus({zoomWindowPosition: "demo-container", zoomWindowHeight: 200,
+ zoomWindowWidth:200, borderSize: 0, easing:true});
+ $("#zoom_04d").ezPlus({zoomWindowPosition: 1, zoomWindowOffetx: 10});
+ <img id="zoom_05" src="small/image1.png"
+ data-zoom-image="large/image1.jpg"/>
+ $("#zoom_05").ezPlus({
+ zoomType : "inner",
+ cursor: "crosshair"
+ });
+
+ You can use the lens zoom setting to "Magnify the image".
+ The image to the lest has been constrained so it tucks underneath the image.
+
<img id="zoom_07" src="small/image1.png"
+ data-zoom-image="large/image1.jpg"/>
+ $("#zoom_07").ezPlus({
+ zoomType : "lens",
+ lensShape : "round",
+ lensSize : 200
+ });
+ + You can fade in and out on the Lens, Window and Tint +
+ SHOW THE CODE + +<img id="zoom_08" src="small/image1.png"
+ data-zoom-image="large/image1.jpg"/>
+ $("#zoom_08").ezPlus({
+ zoomWindowFadeIn: 500,
+ zoomWindowFadeOut: 500,
+ lensFadeIn: 500,
+ lensFadeOut: 500
+ });
+ + You can fade in and out on the Lens, Window and Tint + Change the image on dropdown + +
+ SHOW THE CODE + +<img id="zoom_09" src="small/image1.png" data-zoom-image="large/image1.jpg"/>
+
+ <select id="select">
+ <option value="1">Front</option>
+ <option value="2">Back</option>
+ <option value="3">Scenery</option>
+ <option value="4">Side</option>
+ </select>
+ $("#zoom_09").ezPlus({
+ gallery : "gallery_09",
+ galleryActiveClass: "active"
+ });
+
+
+ $("#select").change(function(e){
+ var currentValue = $("#select").val();
+ if(currentValue == 1){
+ smallImage = 'https://cdn.rawgit.com/igorlino/elevatezoom-plus/1.1.6/demo/images/small/image1.jpg';
+ largeImage = 'https://cdn.rawgit.com/igorlino/elevatezoom-plus/1.1.6/demo/images/large/image1.jpg';
+ }
+ if(currentValue == 2){
+ smallImage = 'https://cdn.rawgit.com/igorlino/elevatezoom-plus/1.1.6/demo/images/small/image2.jpg';
+ largeImage = 'https://cdn.rawgit.com/igorlino/elevatezoom-plus/1.1.6/demo/images/large/image2.jpg';
+ }
+ if(currentValue == 3){
+ smallImage = 'https://cdn.rawgit.com/igorlino/elevatezoom-plus/1.1.6/demo/images/small/image3.jpg';
+ largeImage = 'https://cdn.rawgit.com/igorlino/elevatezoom-plus/1.1.6/demo/images/large/image3.jpg';
+ }
+ if(currentValue == 4){
+ smallImage = 'https://cdn.rawgit.com/igorlino/elevatezoom-plus/1.1.6/demo/images/small/image4.jpg';
+ largeImage = 'https://cdn.rawgit.com/igorlino/elevatezoom-plus/1.1.6/demo/images/large/image4.jpg';
+ }
+ // Example of using Active Gallery
+ $('#gallery_09 a').removeClass('active').eq(currentValue-1).addClass('active');
+
+
+ var ez = $('#zoom_09').data('ezPlus');
+
+ ez.swaptheimage(smallImage, largeImage);
+
+ });
+ + You can use the default easing or a custom easing setting. + The amount of easing can also be altered - default is 12, set higher for more, lower for less + +
+ SHOW THE CODE + +<img id="zoom_10" src="small/image1.png"
+ data-zoom-image="large/image1.jpg"/>
+ $("#zoom_10").ezPlus({easing :
+ true});
+ <img id="zoom_mw" src="small/image1.png"
+ data-zoom-image="large/image1.jpg"/>
+ $("#zoom_mw").ezPlus({scrollZoom :
+ true});
+ + The Zoom Window Size can be adjusted to any proportions. + +
+ SHOW THE CODE + +<img id="zoom_13" src="small/image1.png" data-zoom-image="large/image1.jpg"/>
+ <img id="zoom_14" src="small/image1.png"
+ data-zoom-image="large/image1.jpg"/>
+ $("#zoom_13").ezPlus({
+ zoomWindowWidth:300,
+ zoomWindowHeight:100
+ });
+
+ $("#zoom_14").ezPlus({
+ zoomWindowWidth:100,
+ zoomWindowHeight:300
+ });
+ + You can attach a set of images to the zoom. + Also you can pass a gallery to the lightbox +
+ SHOW THE CODE +<img id="img_01" src="small/image1.jpg" data-zoom-image="large/image1.jpg"/>
+
+ <div id="gal1">
+
+ <a href="#" data-image="small/image1.jpg" data-zoom-image="large/image1.jpg">
+ <img id="img_01" src="thumb/image1.jpg" />
+ </a>
+
+ <a href="#" data-image="small/image2.jpg" data-zoom-image="large/image2.jpg">
+ <img id="img_01" src="thumb/image2.jpg" />
+ </a>
+
+ <a href="#" data-image="small/image3.jpg" data-zoom-image="large/image3.jpg">
+ <img id="img_01" src="thumb/image3.jpg" />
+ </a>
+
+ <a href="#" data-image="small/image4.jpg" data-zoom-image="large/image4.jpg">
+ <img id="img_01" src="thumb/image4.jpg" />
+ </a>
+
+ </div>
+ //initiate the plugin and pass the id of the div containing gallery images
+ $("#zoom_03").ezPlus({constrainType:"height", constrainSize:274, zoomType: "lens",
+ containLensZoom: true, gallery:'gallery_01', cursor: 'pointer', galleryActiveClass: "active"});
+
+ //pass the images to Fancybox
+ $("#zoom_03").bind("click", function(e) {
+ var ez = $('#zoom_03').data('ezPlus');
+ $.fancyboxPlus(ez.getGalleryList());
+ return false;
+ });
+ /*set a border on the images to prevent shifting*/
+ #gallery_01 img{border:2px solid white;}
+
+ /*Change the colour*/
+ .active img{border:2px solid #333 !important;}
+ Contact: info [at] issues + /please, don`t send emails for help, use issues instead
diff --git a/demo/header.html b/demo/header.html new file mode 100644 index 0000000..44e6cc7 --- /dev/null +++ b/demo/header.html @@ -0,0 +1,6 @@ +Use these examples as a way to quickly start any new web project that requires image zooming.
+ + +