Skip to content
Browse files

fixed jQuery 1.8+ issue

  • Loading branch information...
1 parent 79b364a commit 7b7368b7ecafadd164e7ecce6f77887413c17a35 @Mottie Mottie committed Oct 31, 2012
Showing with 37 additions and 19 deletions.
  1. +10 −0 README.markdown
  2. +2 −2 double.html
  3. +2 −2 image.html
  4. +2 −3 index.html
  5. +2 −2 js/jquery.anythingzoomer.js
  6. +2 −2 js/jquery.anythingzoomer.min.js
  7. +1 −1 package.json
  8. +2 −2 swap.html
  9. +2 −2 text.html
  10. +12 −3 use.html
View
10 README.markdown
@@ -11,6 +11,16 @@
## Changelog
+### Version 2.2 (10/31/2012)
+* Fixed an issue with jQuery v1.8+:
+ * jQuery 1.8 changed how the [box-sizing measured the width](http://blog.jquery.com/2012/08/16/jquery-1-8-box-sizing-width-csswidth-and-outerwidth/). Which returned a width of zero for the inner zoom content.
+ * Changed the plugin to measure the width of the content children, so a zoom window should have its content wrapped or it may return an incorrect value.
+ * See [issue #7](https://github.com/CSS-Tricks/AnythingZoomer/issues/7).
+* Added a `delay` option:
+ * Setting a delay, in milliseconds, will delay the time until the zoom window opens.
+ * This is useful when a user quickly scrolls through the zoom area.
+ * See [issue #8](https://github.com/CSS-Tricks/AnythingZoomer/issues/8) for this feature request.
+
### Version 2.1.1 (7/3/2012)
* Fixed calendar demo links. The shortcut method was previously ignoring jQuery selectors: `$('#zoom').anythingZoomer('.day[rel=2009-08-26]');`.
View
4 double.html
@@ -12,7 +12,7 @@
<!-- anythingZoomer required -->
<link rel="stylesheet" href="css/anythingzoomer.css">
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script src="js/jquery.anythingzoomer.js"></script>
<script>
$(function() {
@@ -50,7 +50,7 @@
<li><a href="text.html">Text</a></li>
<li><a class="current" href="double.html">Double</a></li>
<li><a class="use" href="use.html">Usage</a></li>
- <li><a class="play" href="http://jsfiddle.net/Mottie/KwvjL/">Playground</a></li>
+ <li><a class="play" href="http://jsfiddle.net/Mottie/6sp2b/">Playground</a></li>
<li><a class="issue" href="https://github.com/CSS-Tricks/AnythingZoomer/issues">Issues</a></li>
</ul>
View
4 image.html
@@ -10,7 +10,7 @@
<link rel="stylesheet" href="demo/style.css">
<link rel="stylesheet" href="css/anythingzoomer.css">
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script src="js/jquery.anythingzoomer.js"></script>
<script>
$(function() {
@@ -55,7 +55,7 @@
<li><a href="text.html">Text</a></li>
<li><a href="double.html">Double</a></li>
<li><a class="use" href="use.html">Usage</a></li>
- <li><a class="play" href="http://jsfiddle.net/Mottie/KwvjL/">Playground</a></li>
+ <li><a class="play" href="http://jsfiddle.net/Mottie/6sp2b/">Playground</a></li>
<li><a class="issue" href="https://github.com/CSS-Tricks/AnythingZoomer/issues">Issues</a></li>
</ul>
View
5 index.html
@@ -10,8 +10,7 @@
<link rel="stylesheet" href="demo/style.css">
<link rel="stylesheet" href="css/anythingzoomer.css">
- <!-- TODO: Calendar demo failing w/ jQuery 1.8 -->
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script src="js/jquery.anythingzoomer.js"></script>
<script>
$(function() {
@@ -59,7 +58,7 @@
<li><a href="text.html">Text</a></li>
<li><a href="double.html">Double</a></li>
<li><a class="use" href="use.html">Usage</a></li>
- <li><a class="play" href="http://jsfiddle.net/Mottie/KwvjL/">Playground</a></li>
+ <li><a class="play" href="http://jsfiddle.net/Mottie/6sp2b/">Playground</a></li>
<li><a class="issue" href="https://github.com/CSS-Tricks/AnythingZoomer/issues">Issues</a></li>
</ul>
View
4 js/jquery.anythingzoomer.js
@@ -159,11 +159,11 @@
// get height from either the inner content itself or the children of the inner content since span will need
// a "display:block" to get an accurate height, but adding that messes up the width
base.$zoom.show();
- base.largeDim = [ base.$lgInner.width(), Math.max( base.$lgInner.height(), base.$lgInner.children().height() ) ];
+ base.largeDim = [ base.$lgInner.children().width(), Math.max( base.$lgInner.height(), base.$lgInner.children().height() ) ];
base.zoomDim = base.last = [ base.$zoom.width(), base.$zoom.height() ];
base.$zoom.hide();
- base.smallDim = [ base.$smInner.width(), base.$small.height() ];
+ base.smallDim = [ base.$smInner.children().width(), base.$small.height() ];
base.$overlay = $('<div class="' + n.overly + '" style="position:absolute;left:0;top:0;" />').prependTo(base.$small);
base.ratio = [
base.largeDim[0] / (base.smallDim[0] || 1),
View
4 js/jquery.anythingzoomer.min.js
@@ -1,7 +1,7 @@
/*!
- AnythingZoomer v2.1.1 minified
+ AnythingZoomer v2.2 minified
Original by Chris Coyier: http://css-tricks.com
Get the latest version: https://github.com/CSS-Tricks/AnythingZoomer
*/
-;(function(d){d.anythingZoomer=function(e,i){var b,c,f,a=this;a.$wrap=d(e);a.wrap=e;a.$wrap.data("zoomer",a);a.init=function(){a.options=c=d.extend({},d.anythingZoomer.defaultOptions,i);b=d.anythingZoomer.classNames;a.state=!0;a.enabled=!0;a.$wrap.addClass(b.wrap).wrapInner('<span class="'+b.wrapInner+'"/>');a.$inner=a.$wrap.find("."+b.wrapInner);a.$small=a.$wrap.find("."+c.smallArea);a.$large=a.$wrap.find("."+c.largeArea);a.update();a.$large.addClass(b.large);a.$small.addClass(b.small);a.$inner.bind("mouseenter"+ b.namespace,function(){a.state&&a.enabled&&(a.$zoom.stop(!0,!0).fadeIn(c.speed),c.overlay&&a.$overlay.addClass(b.overlay),a.$smInner.addClass(b.hovered),a.$wrap.trigger("zoom",a))}).bind("mouseleave"+b.namespace,function(){a.state&&a.enabled&&(a.timer=setTimeout(function(){a.$zoom.hasClass(b.windowed)&&a.hideZoom(!0)},200))}).bind("mousemove"+b.namespace,function(b){if(a.state&&a.enabled){clearTimeout(a.timer);var c=a.$small.offset();a.zoomAt(b.pageX-c.left,b.pageY-c.top,null,!0)}}).bind(c.switchEvent+ (""!==c.switchEvent?b.namespace:""),function(){a.enabled&&(a.state?a.showLarge():a.showSmall())});a.showSmall();d.each(["initialized","zoomed","unzoomed"],function(b,h){d.isFunction(c[h])&&a.$wrap.bind(h,c[h])});a.initialized=!0;a.$wrap.trigger("initialized",a)};a.update=function(){a.initialized&&a.showSmall();a.$smInner=a.$small.find("."+b.smallInner).length?a.$small.find("."+b.smallInner):a.$small.wrapInner('<span class="'+b.smallInner+'"/>').find("."+b.smallInner);a.$small.find("."+b.overly).remove(); c.clone&&(f=a.$smInner.clone().removeClass(b.smallInner).addClass(b.largeInner),a.$large.length?a.$large.html(f.html()):(f.wrap('<div class="'+c.largeArea+'">'),a.$small.after(f.parent()),a.$large=a.$wrap.find("."+c.largeArea)));a.$lgInner=a.$large.find("."+b.largeInner).length?a.$large.find("."+b.largeInner):a.$large.wrapInner('<span class="'+b.largeInner+'"/>').find("."+b.largeInner);a.$wrap.find("."+b.zoom).length||(a.$large.wrap('<div class="'+b.zoom+'"/>'),a.$zoom=a.$wrap.find("."+b.zoom));c.edit&& !a.edit&&(a.edit=d('<span class="'+b.edit+'"></span>').appendTo(a.$zoom));a.$zoom.show();a.largeDim=[a.$lgInner.width(),Math.max(a.$lgInner.height(),a.$lgInner.children().height())];a.zoomDim=a.last=[a.$zoom.width(),a.$zoom.height()];a.$zoom.hide();a.smallDim=[a.$smInner.width(),a.$small.height()];a.$overlay=d('<div class="'+b.overly+'" style="position:absolute;left:0;top:0;" />').prependTo(a.$small);a.ratio=[a.largeDim[0]/(a.smallDim[0]||1),a.largeDim[1]/(a.smallDim[1]||1)];a.$inner.add(a.$overlay).css({width:a.smallDim[0], height:a.smallDim[1]})};a.showSmall=function(){a.state=!0;a.$small.show();a.$zoom.removeClass(b.expanded).addClass(b.windowed+" "+b.zoom).css({width:a.zoomDim[0],height:a.zoomDim[1]});a.$inner.css({width:a.smallDim[0],height:a.smallDim[1]})};a.showLarge=function(){a.state=!1;a.$small.hide();a.$zoom.stop(!0,!0).fadeIn(c.speed).addClass(b.expanded).removeClass(b.windowed+" "+b.zoom).css({height:"auto",width:"auto"});a.$inner.css({width:a.largeDim[0],height:a.largeDim[1]});a.$large.css({left:0,top:0, width:a.largeDim[0],height:a.largeDim[1]})};a.setTarget=function(g,h,n){var e=0,f=0;clearTimeout(a.timer);a.$zoom.hasClass(b.windowed)||a.showSmall();!isNaN(g)&&!isNaN(h)?(e=parseInt(g,10),f=parseInt(h,10)):"string"===typeof g&&d(g).length&&(g=d(g),e=g.position().left+g.width()/2+(h?h[0]||0:0),f=g.position().top+g.height()/2+(h?h[1]||0:0));a.zoomAt(e,f,n);c.overlay&&a.$overlay.addClass(b.overlay);a.$smInner.addClass(b.hovered);a.$wrap.trigger("zoom",a)};a.zoomAt=function(b,d,e,f){var i=(e?e[0]||0: 0)||a.last[0],e=(e?e[1]||e[0]||0:0)||a.last[1],j=i/2,k=e/2,l=c.edge||(0===c.edge?0:0.66*j),m=c.edge||(0===c.edge?0:0.66*k),o=parseInt(a.$inner.css("margin-left"),10)||a.$inner.position().left||0;a.last=[i,e];a.current=[b,d];c.edit&&a.edit.html(Math.round(b)+", "+Math.round(d));b<-l||b>a.smallDim[0]+l||d<-m||d>a.smallDim[1]+m?a.hideZoom(f):(a.$zoom.stop(!0,!0).fadeIn(c.speed),a.$zoom.css({left:b-j+o,top:d-k,width:i,height:e}),a.$large.css({left:-(b-c.offsetX-j/2)*a.ratio[0],top:-(d-c.offsetY-k/2)* a.ratio[1]}))};a.hideZoom=function(d){d&&a.$smInner.hasClass(b.hovered)&&a.$wrap.trigger("unzoom",a);a.last=a.zoomDim;a.$zoom.stop(!0,!0).fadeOut(c.speed);a.$overlay.removeClass(b.overlay);a.$smInner.removeClass(b.hovered);a.lastKey=null};a.setEnabled=function(b){a.enabled=b;b||(a.showSmall(),a.hideZoom())};a.init()};d.anythingZoomer.classNames={namespace:".anythingZoomer",wrap:"az-wrap",wrapInner:"az-wrap-inner",large:"az-large",largeInner:"az-large-inner",small:"az-small",smallInner:"az-small-inner", overlay:"az-overlay",overly:"az-overly",hovered:"az-hovered",zoom:"az-zoom",windowed:"az-windowed",expanded:"az-expanded",edit:"az-coords"};d.anythingZoomer.defaultOptions={smallArea:"small",largeArea:"large",clone:!1,overlay:!1,speed:100,edge:30,offsetX:0,offsetY:0,switchEvent:"dblclick",edit:!1};d.fn.anythingZoomer=function(e,i,b,c){return this.each(function(){var f=d(this).data("zoomer");if(/object|undefined/.test(typeof e))f?f.update():new d.anythingZoomer(this,e);else if(f&&("string"===typeof e|| !isNaN(e)&&!isNaN(i)))/(en|dis)able/.test(e)?f.setEnabled("enable"===e):f.setTarget(e,i,b,c)})};d.fn.getAnythingZoomer=function(){return this.data("zoomer")}})(jQuery);
+;(function(d){d.anythingZoomer=function(e,i){var b,c,f,a=this;a.$wrap=d(e);a.wrap=e;a.$wrap.data("zoomer",a);a.init=function(){a.options=c=d.extend({},d.anythingZoomer.defaultOptions,i);b=d.anythingZoomer.classNames;a.state=!0;a.enabled=!0;a.hovered=!1;a.$wrap.addClass(b.wrap).wrapInner('<span class="'+b.wrapInner+'"/>');a.$inner=a.$wrap.find("."+b.wrapInner);a.$small=a.$wrap.find("."+c.smallArea);a.$large=a.$wrap.find("."+c.largeArea);a.update();a.$large.addClass(b.large);a.$small.addClass(b.small); a.$inner.bind("mouseenter"+b.namespace,function(){a.saved=a.enabled;a.hovered=!0;c.delay?(clearTimeout(a.delay),a.enabled=!1,a.delay=setTimeout(function(){a.enabled=a.saved;a.position.type="mousemove";a.$inner.trigger(a.position);a.reveal()},c.delay)):a.reveal()}).bind("mouseleave"+b.namespace,function(){a.hovered=!1;c.delay&&(clearTimeout(a.delay),a.enabled=a.saved);a.state&&a.enabled&&(a.timer=setTimeout(function(){a.$zoom.hasClass(b.windowed)&&a.hideZoom(!0)},200))}).bind("mousemove"+b.namespace, function(b){a.position=b;if(a.hovered&&a.state&&a.enabled){clearTimeout(a.timer);var c=a.$small.offset();a.zoomAt(b.pageX-c.left,b.pageY-c.top,null,!0)}}).bind(c.switchEvent+(""!==c.switchEvent?b.namespace:""),function(){a.enabled&&(a.state?a.showLarge():a.showSmall())});a.showSmall();d.each(["initialized","zoomed","unzoomed"],function(b,h){d.isFunction(c[h])&&a.$wrap.bind(h,c[h])});a.initialized=!0;a.$wrap.trigger("initialized",a)};a.reveal=function(){a.enabled=a.saved;a.state&&a.enabled&&(a.$zoom.stop(!0, !0).fadeIn(c.speed),c.overlay&&a.$overlay.addClass(b.overlay),a.$smInner.addClass(b.hovered),a.$wrap.trigger("zoom",a))};a.update=function(){a.initialized&&a.showSmall();a.$smInner=a.$small.find("."+b.smallInner).length?a.$small.find("."+b.smallInner):a.$small.wrapInner('<span class="'+b.smallInner+'"/>').find("."+b.smallInner);a.$small.find("."+b.overly).remove();c.clone&&(f=a.$smInner.clone().removeClass(b.smallInner).addClass(b.largeInner),a.$large.length?a.$large.html(f.html()):(f.wrap('<div class="'+ c.largeArea+'">'),a.$small.after(f.parent()),a.$large=a.$wrap.find("."+c.largeArea)));a.$lgInner=a.$large.find("."+b.largeInner).length?a.$large.find("."+b.largeInner):a.$large.wrapInner('<span class="'+b.largeInner+'"/>').find("."+b.largeInner);a.$wrap.find("."+b.zoom).length||(a.$large.wrap('<div class="'+b.zoom+'"/>'),a.$zoom=a.$wrap.find("."+b.zoom));c.edit&&!a.edit&&(a.edit=d('<span class="'+b.edit+'"></span>').appendTo(a.$zoom));a.$zoom.show();a.largeDim=[a.$lgInner.children().width(),Math.max(a.$lgInner.height(), a.$lgInner.children().height())];a.zoomDim=a.last=[a.$zoom.width(),a.$zoom.height()];a.$zoom.hide();a.smallDim=[a.$smInner.children().width(),a.$small.height()];a.$overlay=d('<div class="'+b.overly+'" style="position:absolute;left:0;top:0;" />').prependTo(a.$small);a.ratio=[a.largeDim[0]/(a.smallDim[0]||1),a.largeDim[1]/(a.smallDim[1]||1)];a.$inner.add(a.$overlay).css({width:a.smallDim[0],height:a.smallDim[1]})};a.showSmall=function(){a.state=!0;a.$small.show();a.$zoom.removeClass(b.expanded).addClass(b.windowed+ " "+b.zoom).css({width:a.zoomDim[0],height:a.zoomDim[1]});a.$inner.css({width:a.smallDim[0],height:a.smallDim[1]})};a.showLarge=function(){a.state=!1;a.$small.hide();a.$zoom.stop(!0,!0).fadeIn(c.speed).addClass(b.expanded).removeClass(b.windowed+" "+b.zoom).css({height:"auto",width:"auto"});a.$inner.css({width:a.largeDim[0],height:a.largeDim[1]});a.$large.css({left:0,top:0,width:a.largeDim[0],height:a.largeDim[1]})};a.setTarget=function(g,h,n){var e=0,f=0;clearTimeout(a.timer);a.$zoom.hasClass(b.windowed)|| a.showSmall();!isNaN(g)&&!isNaN(h)?(e=parseInt(g,10),f=parseInt(h,10)):"string"===typeof g&&d(g).length&&(g=d(g),e=g.position().left+g.width()/2+(h?h[0]||0:0),f=g.position().top+g.height()/2+(h?h[1]||0:0));a.zoomAt(e,f,n);c.overlay&&a.$overlay.addClass(b.overlay);a.$smInner.addClass(b.hovered);a.$wrap.trigger("zoom",a)};a.zoomAt=function(b,d,e,f){var i=(e?e[0]||0:0)||a.last[0],e=(e?e[1]||e[0]||0:0)||a.last[1],j=i/2,k=e/2,l=c.edge||(0===c.edge?0:0.66*j),m=c.edge||(0===c.edge?0:0.66*k),p=parseInt(a.$inner.css("margin-left"), 10)||a.$inner.position().left||0;a.last=[i,e];a.current=[b,d];c.edit&&a.edit.html(Math.round(b)+", "+Math.round(d));b<-l||b>a.smallDim[0]+l||d<-m||d>a.smallDim[1]+m?a.hideZoom(f):(a.$zoom.stop(!0,!0).fadeIn(c.speed),a.$zoom.css({left:b-j+p,top:d-k,width:i,height:e}),a.$large.css({left:-(b-c.offsetX-j/2)*a.ratio[0],top:-(d-c.offsetY-k/2)*a.ratio[1]}))};a.hideZoom=function(d){d&&a.$smInner.hasClass(b.hovered)&&a.$wrap.trigger("unzoom",a);a.last=a.zoomDim;a.$zoom.stop(!0,!0).fadeOut(c.speed);a.$overlay.removeClass(b.overlay); a.$smInner.removeClass(b.hovered);a.lastKey=null};a.setEnabled=function(b){a.enabled=b;b||(a.showSmall(),a.hideZoom())};a.init()};d.anythingZoomer.classNames={namespace:".anythingZoomer",wrap:"az-wrap",wrapInner:"az-wrap-inner",large:"az-large",largeInner:"az-large-inner",small:"az-small",smallInner:"az-small-inner",overlay:"az-overlay",overly:"az-overly",hovered:"az-hovered",zoom:"az-zoom",windowed:"az-windowed",expanded:"az-expanded",edit:"az-coords"};d.anythingZoomer.defaultOptions={smallArea:"small", largeArea:"large",clone:!1,overlay:!1,speed:100,edge:30,offsetX:0,offsetY:0,delay:0,switchEvent:"dblclick",edit:!1};d.fn.anythingZoomer=function(e,i,b,c){return this.each(function(){var f=d(this).data("zoomer");if(/object|undefined/.test(typeof e))f?f.update():new d.anythingZoomer(this,e);else if(f&&("string"===typeof e||!isNaN(e)&&!isNaN(i)))/(en|dis)able/.test(e)?f.setEnabled("enable"===e):f.setTarget(e,i,b,c)})};d.fn.getAnythingZoomer=function(){return this.data("zoomer")}})(jQuery);
View
2 package.json
@@ -1,6 +1,6 @@
{
"name": "AnythingZoomer",
- "version": "2.1.1",
+ "version": "2.2",
"title": "AnythingZoomer",
"author": {
"name": "Chris Coyier",
View
4 swap.html
@@ -10,7 +10,7 @@
<link rel="stylesheet" href="demo/style.css">
<link rel="stylesheet" href="css/anythingzoomer.css">
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script src="js/jquery.anythingzoomer.js"></script>
<style>
/* FOR IMAGE DEMO */
@@ -53,7 +53,7 @@
<li><a href="text.html">Text</a></li>
<li><a href="double.html">Double</a></li>
<li><a class="use" href="use.html">Usage</a></li>
- <li><a class="play" href="http://jsfiddle.net/Mottie/KwvjL/">Playground</a></li>
+ <li><a class="play" href="http://jsfiddle.net/Mottie/6sp2b/">Playground</a></li>
<li><a class="issue" href="https://github.com/CSS-Tricks/AnythingZoomer/issues">Issues</a></li>
</ul>
View
4 text.html
@@ -10,7 +10,7 @@
<link rel="stylesheet" href="demo/style.css">
<link rel="stylesheet" href="css/anythingzoomer.css">
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script src="js/jquery.anythingzoomer.js"></script>
<script>
$(function() {
@@ -58,7 +58,7 @@
<li><a class="current" href="text.html">Text</a></li>
<li><a href="double.html">Double</a></li>
<li><a class="use" href="use.html">Usage</a></li>
- <li><a class="play" href="http://jsfiddle.net/Mottie/KwvjL/">Playground</a></li>
+ <li><a class="play" href="http://jsfiddle.net/Mottie/6sp2b/">Playground</a></li>
<li><a class="issue" href="https://github.com/CSS-Tricks/AnythingZoomer/issues">Issues</a></li>
</ul>
View
15 use.html
@@ -8,7 +8,7 @@
<link href="http://fonts.googleapis.com/css?family=Merienda+One" rel="stylesheet">
<link rel="stylesheet" href="demo/style.css">
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script src="demo/page.js"></script>
<!-- Syntax highlighting -->
@@ -31,7 +31,7 @@ <h1 id="top">AnythingZoomer<sup>2</sup></h1>
<li><a href="text.html">Text</a></li>
<li><a href="double.html">Double</a></li>
<li><a class="current" class="use" href="use.html">Usage</a></li>
- <li><a class="play" href="http://jsfiddle.net/Mottie/KwvjL/">Playground</a></li>
+ <li><a class="play" href="http://jsfiddle.net/Mottie/6sp2b/">Playground</a></li>
<li><a class="issue" href="https://github.com/CSS-Tricks/AnythingZoomer/issues">Issues</a></li>
</ul>
@@ -47,14 +47,15 @@ <h2 id="basics">Basics</h2>
work correctly, so read on. The full list of parameters is also below.</p>
<pre class="html">&lt;link rel="stylesheet" href="css/anythingzoomer.css"&gt;
-&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;js/jquery.anythingzoomer.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
$(function(){
$(&quot;#zoom&quot;).anythingZoomer();
});
&lt;/script&gt;
</pre>
+<small>* The minimum supported jQuery version is 1.3.2.</small>
<h2 id="html">The HTML</h2>
@@ -197,6 +198,7 @@ <h2 id="parameters">All Parameters</h2>
// functionality
switchEvent : 'dblclick', // event that allows toggling between small and large elements - default is double click
+ delay : 0, // time to delay before revealing the zoom window
// edit mode
edit : false, // add x,y coordinates into zoom window to make it easier to find coordinates
@@ -267,6 +269,13 @@ <h2 id="parameters">All Parameters</h2>
<li>Default value is <code>dblclick</code>.</li>
</ul>
+ <h4>delay</h4>
+ <ul>
+ <li>Time to delay (in milliseconds) before revealing the zoom window.</li>
+ <li>This is useful if you don't want the zoom window to open when the user is quickly passing over the content.</li>
+ <li>Default value is <code>0</code>.</li>
+ </ul>
+
<h4>edit</h4>
<ul>
<li>When true, this option will add x,y coordinates into zoom window to make it easier to find coordinates.</li>

0 comments on commit 7b7368b

Please sign in to comment.
Something went wrong with that request. Please try again.