图片显示--放大镜效果(JQuery)

http://www.itpob.cn

jQZoom allows you to realize a small magnifier window close to the image or images on your web page easily.

I decided to build this jQuery plugin to embed detailed big images in my B2B.So now in few steps you can have your jQZoom in your website,eCommerce or whatever you want.Author: Renzi Marco ,December 2007

1)Simply include the jqzoom.css in your page.(在你的页面加载jqzoom.ss)

<link rel="stylesheet" href="your_path/jqzoom.css" type="text/css" media="screen">

2)Include jQzoom and jQuery code(加载jquery.js以及jqzoom.js文件)


&lt;script type="text/javascript" src="your_path/jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="your_path/jquery.jqzoom.js"&gt;&lt;/script&gt;

3)Now assign the "jqzoom" class to the image or images you would like to zoom,and specify for each one,the alt attribute,to wich you are going to assign the big image path.(现在吧jqzoom赋给你要显示的图片,要分别设置每一张图片,alt路径代表你对应的放大的图片的位置)

<img src="your_path/imagename_small.jpg" class="jqzoom" alt="your_path/imagename_big.jpg">

4)Load the plugin at window load

jQuery(document).ready(function(){ $("img.jqzoom").jqueryzoom(); });

You can also specify some options:

jQuery(document).ready(function(){

$("img.jqzoom").jqueryzoom(

{ xzoom: 300, //zooming div default width(default width value is 200)

 yzoom: 300, //zooming div default width(default height value is 200)

offset: 40, //zooming div default offset(default offset value is 10)

position: "right" //zooming div position(default position value is "right") }); });

DEMO演示:http://bbs.okajax.com/demo/17/

源码下载:

文件:jQZoom_v1.1.zip
大小:296KB
下载:下载
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值