最新jquery zoom插件

http://www.elevateweb.co.uk/image-zoom/examples

Installation and usage

Download the source files (available here) and include the jquery and elevatezoom plugin files into your project

<script  type="text/javascript" src="jquery.js"></script>
<script src="jquery.elevatezoom.js" type="text/javascript"></script>

Include your Image

Elevate Zoom 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 ifyou 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").elevateZoom();
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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值