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 @@ +
+
+ + +

Configuration Options

+ +

These are the available options for the zoom

+ +

See some examples of usage on our examples page +

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDefault ValueDesciption
responsivefalseSet 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"
scrollZoomfalseSet to true to activate zoom on mouse scroll. Possible Values: "True", "False" +
imageCrossfadefalseSet to true to activate simultaneous crossfade of images on gallery change. Possible Values: + "True", "False"
loadingIconfalseSet to the url of the spinner icon to activate, e.g, http://www.example.com/spinner.gif. + Possible Values: "True", "False"
easingfalseSet to true to activate easing. Possible Values: "True", "False"
easingTypezoomdefault

default easing type is easeOutExpo, (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b
+ Extend jquery with other easing types before initiating the plugin and pass the easing type as a + string value. +

easingDuration2000 
lensSize200used when zoomType set to lens, when zoom type is set to window, then the lens size is auto + calculated +
zoomWindowWidth400Width of the zoomWindow (Note: zoomType must be "window")
zoomWindowHeight400Height of the zoomWindow (Note: zoomType must be "window")
zoomWindowOffetx0x-axis offset of the zoom window
zoomWindowOffety0y-axis offset of the zoom window
zoomWindowPosition1Once positioned, use zoomWindowOffsetx and zoomWindowOffsety to adjust
+ Possible values: 1-16 +
lensFadeInfalseSet as a number e.g 200 for speed of Lens fadeIn
lensFadeOutfalseSet as a number e.g 200 for speed of Lens fadeOut
zoomWindowFadeInfalseSet as a number e.g 200 for speed of Window fadeIn
zoomWindowFadeOutfalseSet as a number e.g 200 for speed of Window fadeOut
zoomTintFadeInfalseSet as a number e.g 200 for speed of Tint fadeIn
zoomTintFadeOutfalseSet as a number e.g 200 for speed of Tint fadeOut
borderSize4Border Size of the ZoomBox - Must be set here as border taken into account for plugin + calculations +
zoomLenstrueset to false to hide the Lens
borderColour#888Border Colour
lensBorder1Width in pixels of the lens border
lensShapesquarecan also be round (note that only modern browsers support round, will default to square in older + browsers) +
zoomTypewindowPossible Values: Lens, Window, Inner
containLensZoomfalsefor use with the Lens Zoom Type. This makes sure the lens does not fall outside the outside of + the image +
lensColourwhitecolour 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 +
lenszoomfalse 
tintfalseenable a tint overlay, other options: true
tintColour#333colour of the tint, can be #hex, word (red, blue), or rgb(x, x, x)
tintOpacity0.4opacity of the tint
gallerynullThis assigns a set of gallery links to the zoom image
cursordefaultThe 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 +
+ +
+
+

 

+ + + +
+
+ +
+ diff --git a/demo/app.js b/demo/app.js deleted file mode 100644 index c85e8f0..0000000 --- a/demo/app.js +++ /dev/null @@ -1,4 +0,0 @@ -angular.module('demo', [ - 'demo.controllers', - 'ezplus' -]); diff --git a/demo/css/style.css b/demo/css/style.css new file mode 100644 index 0000000..7206b04 --- /dev/null +++ b/demo/css/style.css @@ -0,0 +1,541 @@ +/* +Theme Name: FancyBox Theme +Theme URI: http://fancybox.net +Description: Custom Theme for the FancyBox Homepage +Version: 1.0 +Author: Janis Skarnelis +Author URI: http://fancybox.net +*/ +html, body, div, dl, dt, dd, ul, li, h1, h2, h3, h4, pre, form, fieldset, p, blockquote, th, td, img, a { + margin: 0; + padding: 0; + border: 0; +} + +html, body { + height: 100%; +} + +body { + color: #3e3e3e; + font: normal 12px Verdana,"lucida console",sans-serif; + background: #F0F0F0 url('../images/bg.jpg') top center no-repeat; +} + +.clear { + clear: both; + font-size: 1px; + line-height: 1px; +} + +h2 { + font-size: 16px; + font-family: "Lucida Grande",Helvetica,Arial,sans-serif; + font-weight: bold; + margin-bottom: 5px; +} + +a { + color: #15081F; + text-decoration: underline; + outline: none; +} + +a:hover { + color: #C73B7C; +} + +#page { + width: 1033px; + margin: 0 auto; +} + +#page.home { + width: 860px; +} + + + +#header { + height: 110px; +} + +#header h1 { + float: left; + margin-left: 20px; + margin-top: 15px; +} + +#header h1 a { + color: #fff; + text-decoration: none; + font-size: 30px; +} + +#header ul { + float: right; + margin-top: 33px; +} + +#header ul li { + display: inline; + padding-left: 27px; + padding-bottom: 10px; +} + +#header ul li a { + color: #D52000; + font-size: 15px; + font-family: Arial; + text-decoration: none; + /*text-shadow: 1px 1px 1px #222222;*/ + position: relative; +} + +#header ul li a.active, #header ul li a:hover { + border-bottom: 1px solid #D52000; +} + +#col_wrap { + /*min-height: 610px;*/ + /*background: #F9F9F7 url('../images/bg_col_right.gif') top right repeat-y;*/ +} + +#col_top { + background: url('../images/bg_col.gif') top left no-repeat; + height: 10px; + line-height: 1; + font-size: 1px; +} + +#col_sep { + background: url('../images/bg_col_sep.gif') bottom left no-repeat; + padding: 17px 0; +} + +#col_left { + float: left; + /*width: 570px;*/ + padding: 20px 20px 20px 30px; +} + +#col_left h1 { + font-family: Tahoma; + font-size: 26px; + font-weight: normal; + color: #872651; + margin-top: 10px; + margin-bottom: 15px; +} + +#col_left h1 span { + font-size: 20px; +} + +#col_left p { + padding-bottom: 15px; + margin: 0; + line-height: 22px; +} + +/* +#col_left img { + padding: 5px; + background: white; + border: 1px solid #BBB; + margin: 7px 14px 7px 0; + width: 160px; +}*/ + +#col_left ul { + padding: 0; + margin: -10px 0 15px 30px; +} + +#col_left ul li { + line-height: 25px; +} + +table.options { + border-left: 1px solid #E2E2E2; + margin-bottom: 15px; +} + +table.options th { + background: #15081F; + color: #fff; + padding: 10px; + text-align: left; + font-weight: normal; + border-right: 1px solid #3B224F; + border-bottom: 1px solid #3B224F; +} + +table.options td { + padding: 7px 10px; + border-right: 1px solid #DDD; + border-bottom: 1px solid #DDD; + line-height: 1.6; +} + +table.options tr.even { + background: #E9E9E9; +} + +table.options tr.sep td { + border-bottom: 1px solid #BBB; +} + +#col_right { + float: right; + width: 230px; + text-align: center; +} + +#col_right h2 { + margin-bottom: 10px; +} + +#col_right p { + text-align: left; + padding-left: 20px; + line-height: 24px; + font-size: 12px; +} + +#adblock { + margin-top: 20px; + margin-left: 25px; + width: 130px; + padding: 0; + text-align: left; +} + +.advertise { + font-size: 10px; + padding-left: 15px; +} + +body .one .bsa_it_ad{background:transparent;border:none;padding:0;margin:0;} +body .one .bsa_it_ad:hover img{-moz-box-shadow:0 0 3px #000;-webkit-box-shadow:0 0 3px #000;box-shadow:0 0 3px #000;} +body .one .bsa_it_ad .bsa_it_i{display:block;padding:0;float:none;margin:0 0 5px;} +body .one .bsa_it_ad .bsa_it_i img{padding:0;border:none;} +body .one .bsa_it_ad .bsa_it_t{padding:6px 0 0 0;} +body .one .bsa_it_p{display:none;} +body #bsap_aplink,body #bsap_aplink:hover{display:block;font-size:10px;margin:12px 0 0;} + + +#col_bottom { + height: 10px; + background: url('../images/bg_col.gif') bottom left no-repeat; + line-height: 1; + font-size: 1px; +} + +#footer { + color: #75A1D0; + padding: 10px 30px 50px 30px; +} + +#footer p { + font-size: 11px; + line-height: 20px; +} + +#footer p a { + color: #75A1D0; +} + +#footer p a:hover { + color: #BBB; +} + +/*#col_left pre { + padding: 0; + margin: 0; + margin-bottom: 10px; + line-height: 20px; + background: #15081F; + width: 570px; + overflow: auto; + overflow-Y: hidden; +} + +#col_left pre code { + margin: 0 0 0 15px; + padding: 16px 0; + display: block; + color: #FFF; + font: normal 11px/18px Verdana,Sans-Serif; +} + +#col_left pre code a { + color: #FFF; +}*/ + +#col_left .faq { + padding: 10px 0; +} + +#col_left .faq strong { + display: block; + padding: 10px; + color: #FFF; + background: #270B2B; + font-weight: normal; +} + +#col_left .faq p { + padding: 10px; + background: #FFF; +} + +#col_left ul.list { + list-style: none; + margin-top: -10px; + margin-left: 10px; +} + +#col_left ul.list li { + background: url('../images/bullet.gif') 0 6px no-repeat; + padding-left: 20px; +} + +#col_left .list { + margin-bottom: 25px; +} + +#col_left .list .h { + font-weight: bold; + background: #F3F3F3; + border-top: 1px solid #E2E2E2; + border-bottom: 1px solid #E2E2E2; + padding: 12px 7px; + color: #555; + margin-bottom: 15px; +} + +#col_left .list p { + padding : 0 10px 10px 10px; +} + +#faq .list .h { + margin-bottom: 10px; +} + +#faq .list { + margin-bottom: 5px; +} + +.right { + float: right; +} + +.note { + padding: 20px 0 0 0; +} + +small { + font-size: 10px; +} + +#social { + float: right; + padding-right: 20px; +} + +#social a { + margin-left: 2px; +} + +#social a img { + padding-top: 4px; +} + +.warn { + padding: 10px 10px 0 10px; + background-color: #FFFFCC; + border: 1px solid #CCCCAA; + margin-right: 30px; + margin-bottom: 25px; + -moz-border-radius: 5px; +} + +/* +* Some CSS for examples +*/ +object, embed { + vertical-align: top; +} + +#login_error { + display: none; + background: red; + color: #FFF; +} + +form label { + display: block; +} + +form p { + padding: 7px; + line-height: 1.6; +} + +#inline1 { + overflow: auto; + width: 500px; + height: 100px; + background-color: #FDFDFD; +} + +#page #inline1 { + display: none; +} + +#page #inline2 { + display: none; +} + +#tip7-title { + text-align: left; +} + +#tip7-title b { + display: block; + margin-right: 80px; +} + +#tip7-title span { + float: right; +} + + + + +#zoom1, #zoom2, #zoom3, #zoom4, #zoom5{ + border: 1px solid #E8E8E6; +} + +.zoom-left{ + float:left; + width:412px; + +} +.zoom-right{ + float:left; + width:320px; + padding:20px; + +} +body { + +} + +hr { + margin: 13px 0; +} + +hr.style-one { + border: 0; + height: 1px; + background: #333; + background-image: -webkit-linear-gradient(left, #ccc, #333, #ccc); + background-image: -moz-linear-gradient(left, #ccc, #333, #ccc); + background-image: -ms-linear-gradient(left, #ccc, #333, #ccc); + background-image: -o-linear-gradient(left, #ccc, #333, #ccc); +} + +hr.style-two { + border: 0; + height: 0px; + background-image: -webkit-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); + background-image: -moz-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); + background-image: -ms-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); + background-image: -o-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); +} + +hr.style-three { + border: 0; + border-bottom: 1px dashed #ccc; + background: #999; +} + + + + +.zoom-wrapper{ + border-radius: 10px; + border: 1px solid #E0E0E0; + padding: 10px; + background-color: #F7F7F7; +} +h6 { + clear: both; + margin-top: 13px !important; + font-size: 15px !important; + margin-top: 7px !important; +} +.view_source { + -moz-box-shadow:inset 0px 1px 0px 0px #ffffff; + -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff; + box-shadow:inset 0px 1px 0px 0px #ffffff; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #FCBDB2), color-stop(1, #E26464) ); + background:-moz-linear-gradient( center top, #FCBDB2 5%, #E26464 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FCBDB2', endColorstr='#E26464'); + background-color:#FCBDB2; + -moz-border-radius:6px; + -webkit-border-radius:6px; + border-radius:6px; + border:1px solid #dcdcdc; + display:inline-block; + color:#ffffff; + font-family:Arial; + font-size:15px; + font-weight:bold; + padding:6px 24px; + text-decoration:none; +}.view_source:hover { + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #E26464), color-stop(1, #FCBDB2) ); + background:-moz-linear-gradient( center top, #FCBDB2 5%, #E26464 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#E26464', endColorstr='#FCBDB2'); + background-color:#FCBDB2; + }.view_source:active { + position:relative; + top:1px; + } +.menutop{ + z-index:3; +} +/* This imageless css button was generated by CSSButtonGenerator.com */ + + +.zoomContainer{ +} + +.zoom-gallery-hover{ + border: 2px solid orange; +} + +.examplenav { + list-style-type: none; + border-radius: 10px; + padding: 10px 10px 0 10px; + background-color: white; + border: 1px solid #F0F0F0; + float: left; + width: 153px; + height: 1000px; +} + +.floatingdiv { + background-color: white; + position: fixed; + left: 0; + bottom: 0; + height: 200px; + width: 200px; + + opacity: 0.4; +} diff --git a/demo/examples.html b/demo/examples.html new file mode 100644 index 0000000..1b4a691 --- /dev/null +++ b/demo/examples.html @@ -0,0 +1,1020 @@ +
+
+ + + + + + + + + +
+ +

Jquery Image Zoom Plugin Examples

+ +
+ +
+
+ +
+
+

Basic Zoom

+ +

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 +
+
+ +
+
HTML
+
<img id="zoom_01" src="small/image1.png"
+                        data-zoom-image="large/image1.jpg"/>
+
JAVASCRIPT
+
$("#zoom_01").ezPlus();
+
+
+
+ + +
+
+ +
+
+

Tints

+ +

+ You can easily set tints for the zoom, you can set the colour and opacity of the tint + overlay to + be any value + +

+ Red
+ +
+
+ black
+ +
+
+ Green
+ +
+

+ SHOW THE CODE + +
+
+ +
+
HTML
+
<img id="zoom_02" src="small/image1.png"
+                        data-zoom-image="large/image1.jpg"/>
+
JAVASCRIPT
+
$("#zoom_02").ezPlus({tint:true,
+                        tintColour:'#F90', tintOpacity:0.5});
+
+
+
+ + +
+
+ + + +
+
+

Gallery & Lightbox

+ +

+ 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. +

+ SHOW THE CODE +
+
+ + +
+
HTML
+
<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>
+
JAVASCRIPT
+
//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;
+    });
+
CSS
+ Note: Don't forget to put the class name you set on the default gallery image so it shows active + from + the start. +
/*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;}
+
+
+
+ + + +
+
+ This container is to show that the zoom can be positioned into any on screen element +
+
+ + +
+ +
+ +
+
+ This container is to show that the zoom can be positioned into any on screen element +
+
+
+
+
+
+ Position 1: Default +
+
+ +
+
+
+
+ Position 12 +
+
+ + +
+
+
+
+ Position in a DIV +
+
+ + +
+
+
+
+ Position 1 - 10 px X-offset +
+
+ + + +
+
+
+ +
+

Window Position

+ +

+ 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 +

+ SHOW THE CODE + +
+
+ +
+
HTML
+
<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"/>
+
JAVASCRIPT
+
$("#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});
+
+
+
+ + +
+
+ +
+
+

Inner Zoom

+ +

+ The zoom can be placed inside of the image +

+ SHOW THE CODE + +
+
+ +
+
HTML
+
<img id="zoom_05" src="small/image1.png"
+                    data-zoom-image="large/image1.jpg"/>
+
JAVASCRIPT
+
$("#zoom_05").ezPlus({
+    zoomType : "inner",
+    cursor: "crosshair"
+    });
+
+
+
+ + +
+
+ +
+
+

Lens Zoom

+ +

+ 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. +

+ SHOW THE CODE + +
+
+ +
+
HTML
+
<img id="zoom_07" src="small/image1.png"
+                    data-zoom-image="large/image1.jpg"/>
+
JAVASCRIPT
+
$("#zoom_07").ezPlus({
+    zoomType : "lens",
+    lensShape : "round",
+    lensSize : 200
+    });
+
+
+
+ + +
+
+ +
+
+

Fade in / Fade Out Settings

+ +

+ You can fade in and out on the Lens, Window and Tint +

+ SHOW THE CODE + +
+
+ +
+
HTML
+
<img id="zoom_08" src="small/image1.png"
+                    data-zoom-image="large/image1.jpg"/>
+
JAVASCRIPT
+
$("#zoom_08").ezPlus({
+    zoomWindowFadeIn: 500,
+    zoomWindowFadeOut: 500,
+    lensFadeIn: 500,
+    lensFadeOut: 500
+    });
+
+
+
+ + +
+
+ + + +
+
+

External Controls

+ +

+ You can fade in and out on the Lens, Window and Tint + Change the image on dropdown + +

+ SHOW THE CODE + +
+
+ +
+
HTML
+
<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>
+
JAVASCRIPT
+
$("#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);
+
+    });
+
+
+
+ + +
+
+ + +
+
+

Easing

+ +

+ 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 + +
+
+ +
+
HTML
+
<img id="zoom_10" src="small/image1.png"
+                data-zoom-image="large/image1.jpg"/>
+
JAVASCRIPT
+
$("#zoom_10").ezPlus({easing :
+                    true});
+
+
+
+ + +
+
+ + +
+
+

Mousewheel Zoom

+ +

+ You can scroll over the image to zoom in closer! + +

+ SHOW THE CODE + +
+
+ +
+
HTML
+
<img id="zoom_mw" src="small/image1.png"
+                data-zoom-image="large/image1.jpg"/>
+
JAVASCRIPT
+
$("#zoom_mw").ezPlus({scrollZoom :
+                true});
+
+
+
+ + + +
+ + +
+
+ + +
+
+

Change the Zoom Window Size

+ +

+ The Zoom Window Size can be adjusted to any proportions. + +

+ SHOW THE CODE + +
+
+ +
+
HTML
+
<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"/>
+
JAVASCRIPT
+
$("#zoom_13").ezPlus({
+    zoomWindowWidth:300,
+    zoomWindowHeight:100
+    });
+
+    $("#zoom_14").ezPlus({
+    zoomWindowWidth:100,
+    zoomWindowHeight:300
+    });
+
+
+
+ + +
+
+ + + +
+
+

Image Constrain

+ +

+ You can attach a set of images to the zoom. + Also you can pass a gallery to the lightbox +

+ SHOW THE CODE +
+
+ + +
+
HTML
+
<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>
+
JAVASCRIPT
+
//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;
+    });
+
CSS
+ Note: Don't forget to put the class name you set on the default gallery image so it shows active + from the + start. +
/*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;}
+
+
+
+ + +
+
+ +
+
+ diff --git a/demo/footer.html b/demo/footer.html new file mode 100644 index 0000000..dced1aa --- /dev/null +++ b/demo/footer.html @@ -0,0 +1,3 @@ +

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 @@ +

Angular-fancybox-plus

+ diff --git a/demo/images/bg.jpg b/demo/images/bg.jpg new file mode 100644 index 0000000..8862145 Binary files /dev/null and b/demo/images/bg.jpg differ diff --git a/demo/images/bg_col.gif b/demo/images/bg_col.gif new file mode 100644 index 0000000..27f2c8f Binary files /dev/null and b/demo/images/bg_col.gif differ diff --git a/demo/images/bg_col_right.gif b/demo/images/bg_col_right.gif new file mode 100644 index 0000000..a699e41 Binary files /dev/null and b/demo/images/bg_col_right.gif differ diff --git a/demo/images/bg_col_sep.gif b/demo/images/bg_col_sep.gif new file mode 100644 index 0000000..8b1e54d Binary files /dev/null and b/demo/images/bg_col_sep.gif differ diff --git a/demo/images/bullet.gif b/demo/images/bullet.gif new file mode 100644 index 0000000..ab9a26e Binary files /dev/null and b/demo/images/bullet.gif differ diff --git a/demo/index.html b/demo/index.html index 4f4ee19..5debcc3 100644 --- a/demo/index.html +++ b/demo/index.html @@ -6,10 +6,7 @@ - Angular Colorbox Demo - - - + Angular-FancyBox-Plus Demo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Angular Elevate Zoom Plus Examples

+ +

Basic example

+ +

Use these examples as a way to quickly start any new web project that requires image zooming.

+ + +

Basic Zoom

+ + +
+ +

Zoom example with Width/Height 75%

+ + + +
+ +

Gallery

+ + + + + + + + + +
+ +
+ + + + + + + + diff --git a/demo/js/app.js b/demo/js/app.js new file mode 100644 index 0000000..4923d4d --- /dev/null +++ b/demo/js/app.js @@ -0,0 +1,56 @@ +angular.module('elevatezoomdemo', [ + 'elevatezoomdemo.controllers', + 'ezplus', + 'fancyboxplus', + 'ui.router' +]) + + .run( + [ '$rootScope', '$state', '$stateParams', + function ($rootScope, $state, $stateParams) { + + // It's very handy to add references to $state and $stateParams to the $rootScope + // so that you can access them from any scope within your applications. + $rootScope.$state = $state; + $rootScope.$stateParams = $stateParams; + } + ] +) + + .config(function($stateProvider, $urlRouterProvider) { + // + // For any unmatched url, redirect to /state1 + $urlRouterProvider.otherwise("/main"); + // + // Now set up the states + $stateProvider + .state('main', { + url: "/main", + templateUrl: "main.html", + controller: DemoCtrl + }) + .state('api', { + url: "/api", + templateUrl: "api.html", + controller: CueCtrl + }) + .state('examples', { + url: "/examples", + templateUrl: "examples.html", + controller: CueCtrl + }); + + function CueCtrl($timeout) { + $timeout(function () { + Cufon.replace('h1', {color: '#ff6347'}); + }, 0); + } + + function BlogCtrl($timeout, $scope, fancyboxService) { + CueCtrl($timeout); + } + + function DemoCtrl($timeout, $scope, fancyboxService) { + CueCtrl($timeout); + } + }); diff --git a/demo/controller.js b/demo/js/controller.js similarity index 98% rename from demo/controller.js rename to demo/js/controller.js index c7deae8..accec8d 100644 --- a/demo/controller.js +++ b/demo/js/controller.js @@ -1,4 +1,4 @@ -angular.module('demo.controllers', []). +angular.module('elevatezoomdemo.controllers', []). controller('EZPlusCtrl', function ($scope, $location) { $scope.imagesForGallery = []; $scope.setApproot = function(appRoot) { diff --git a/demo/js/web.js b/demo/js/web.js new file mode 100644 index 0000000..0174455 --- /dev/null +++ b/demo/js/web.js @@ -0,0 +1,118 @@ +jQuery(document).ready(function () { + + var $ctb = $('.table tbody'), + $cta = $ctb.find('td .arrow'), + $ctr = $cta.parents('tr'); + // + //// object toggelen + //$cta.click(function () { + // return false; + //}); + //$ctr.find('td:lt(2)').hover( + // function () { + // $(this).parent().addClass('hover'); + // }, + // function () { + // $(this).parent().removeClass('hover'); + // } + //).click(function () { + // $('span.params', this).toggle(); + // $(this).parent().toggleClass('closed').find('td:eq(1) small span').each(function () { + // if (this.style.display === 'none') $(this).show(); + // else $(this).hide(); + // }); + // var obj = $('.' + $(this).parent().next().attr('id')); + // if (obj[0].style.display === 'none') obj.show(); + // else obj.hide(); + // return false; + // }).css('cursor', 'pointer').end().find('td:lt(1)').click(); + // + //// achtergrond even/oneven + $ctb.each(function () { + var ctrn = 0; + $('.table tbody tr:odd').addClass('odd'); + $('.table tbody tr:even').addClass('even'); + + }); + + // code + italic + $ctb.find('tr').each(function () { + if ($('td', this).length === 5) $(this).find('td:eq(2)').wrapInner('').end().find('td:eq(3)').addClass('italic'); + if ($('td', this).length === 4) $(this).find('td:eq(2)').addClass('italic'); + if ($('td', this).length === 3) $(this).find('td:eq(1)').addClass('italic'); + }); + + /* + * Zebra-stripping table + */ + + //$('table.options tr:even').addClass('even'); +}); + + +$(document).ready(function () { + + // Using custom configuration + $('#img_01').ezPlus({ + zoomWindowFadeIn: 500, + zoomLensFadeIn: 500, + gallery: 'gal1', + imageCrossfade: true, + zoomWindowWidth: 411, + zoomWindowHeight: 274, + zoomWindowOffetx: 10, + scrollZoom: true, + cursor: 'pointer' + }); + + + $('#img_01').bind('click', function (e) { + var ez = $('#img_01').data('ezPlus'); + $.fancyboxPlus(ez.getGalleryList()); + return false; + }); + $('#img_02').ezPlus({ + gallery: 'gal2', + tint: true, + cursor: 'crosshair', + windowHeight: 600 + }); + $('#img_03').ezPlus({ + zoomType: 'lens', + lensShape: 'round', + lensSize: 200 + }); + + + $('#img_02').bind('click', function (e) { + var ez = $('#img_02').data('ezPlus'); + $.fancyboxPlus(ez.getGalleryList()); + return false; + }); + + +}); + +$(document).ready(function () { + $(function () { + var slide_duration = 1000; + $('.view_source').click(function () { + t = $(this).attr('rel'); + h = $('.' + t + ''); + h.slideToggle(slide_duration); + if ($(this).html() === 'SHOW THE CODE') { + $(this).html('HIDE THE CODE'); + h.show(); + } + else { + $(this).html('SHOW THE CODE'); + } + //slideToggle(slide_duration); + // s.find('div.script:not('+h+')').slideUp(slide_duration); + + return false; + }); + }); +}); + + diff --git a/demo/main.html b/demo/main.html new file mode 100644 index 0000000..d1f5fa9 --- /dev/null +++ b/demo/main.html @@ -0,0 +1,155 @@ +
+
+ + +

What is it?

+ +

+ ElevateZoom-Plus is a jquery + plugin for zooming images within a container or also in a + "lens" + that floats overtop of web page. +
+ It was built using the jQuery library. + Licensed under MIT license +

+ + +

Features

+ +
    +
  • Fully Customisable
  • +
  • Coloured Tints
  • +
  • Fancybox-Plus and Colorbox Gallery Support +
  • +
  • Variable zoom on mouse scroll
  • +
  • External Controls
  • +
  • Window Zoom, Lens Zoom and Inner Zoom
  • +
  • AngularJS directive available: angular-elevatezoom-plus +
  • +
  • Free to use under MIT license
  • + +
+ +
+ + +
+ + + + + + + + + + + + +
+
+
+ + +
+
HTML
+
<img id="zoom_04" src="small/image1.png"
+                    data-zoom-image="large/image1.jpg"/>
+
JAVASCRIPT
+
$("#zoom_04").ezPlus();
+
+ +
+ +
+ +
+

Installation and usage

+ +

No need to download anything, you only need to include the jquery and elevatezoom plugin files into + your project as show below:

+ +
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
+    <script type="text/javascript" src="https://cdn.rawgit.com/igorlino/elevatezoom-plus/1.1.6/src/jquery.ez-plus.js"></script>
+ + +

Include your Image

+ +

ElevateZoom-Plus works best using two images, one low resolution for the visible image, and one + high + resolution for the zoomed image. + If you only have one image available, Elevate Zoom will still work if you scale down the + image, + although this is not recommended as your page load time will increase if + you are loading larger images

+ +

Please ensure your small image is proportionally scaled down from the large image. + +

+

<img id="zoom_01" src="small/image1.png"
+                    data-zoom-image="large/image1.jpg"/>
+

Activate the zoom - Basic + Example

+ +
$("#img_01").ezPlus();
+ +

More Examples

+ + See More examples of the image zoom here + + +
+ + + +
+
+ +
+ diff --git a/start-server.bat b/start-server.bat new file mode 100644 index 0000000..7a5d897 --- /dev/null +++ b/start-server.bat @@ -0,0 +1 @@ +http-server .\ \ No newline at end of file