jQuery實(shí)現(xiàn)點(diǎn)擊小圖顯示大圖代碼分享
本文實(shí)例講述了jQuery實(shí)現(xiàn)點(diǎn)擊小圖顯示大圖效果。分享給大家供大家參考。具體如下:
這是一款基于jQuery實(shí)現(xiàn)的點(diǎn)擊小圖查看大圖的代碼,適合用于產(chǎn)品展示等環(huán)節(jié),便于用戶瀏覽產(chǎn)品細(xì)節(jié),是一款非常實(shí)用的特效代碼。
運(yùn)行效果圖: ----------------------查看效果-----------------------

小提示:瀏覽器中如果不能正常運(yùn)行,可以嘗試切換瀏覽模式。
為大家分享的jQuery實(shí)現(xiàn)點(diǎn)擊小圖顯示大圖效果代碼如下
<head>
<title>jQuery實(shí)現(xiàn)點(diǎn)擊小圖顯示大圖效果</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery.mousewheel-3.0.2.pack.js"></script>
<script type="text/javascript" src="js/jquery.fancybox-1.3.1.js"></script>
<script type="text/javascript" src="js/pngobject.js"></script>
<link rel="stylesheet" href="style/style.css" type="text/css" />
<link rel="stylesheet" href="style/jquery.fancybox-1.3.1.css" type="text/css" />
<script type="text/javascript">
$(document).ready(function() {
/*
* Examples - images
*/
$("a#example1").fancybox({
'titleShow' : false
});
$("a#example2").fancybox({
'titleShow' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic'
});
$("a#example3").fancybox({
'titleShow' : false,
'transitionIn' : 'none',
'transitionOut' : 'none'
});
$("a#example4").fancybox();
$("a#example5").fancybox({
'titlePosition' : 'inside'
});
$("a#example6").fancybox({
'titlePosition' : 'over'
});
$("a[rel=example_group]").fancybox({
'transitionIn' : 'none',
'transitionOut' : 'none',
'titlePosition' : 'over',
'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' ' + title : '') + '</span>';
}
});
/*
* Examples - various
*/
$("#various1").fancybox({
'titlePosition' : 'inside',
'transitionIn' : 'none',
'transitionOut' : 'none'
});
$("#various2").fancybox();
$("#various3").fancybox({
'width' : '75%',
'height' : '75%',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe'
});
$("#various4").fancybox({
'padding' : 0,
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none'
});
});
</script>
</head>
<body>
<div id="content">
<h4>jQuery 實(shí)現(xiàn)點(diǎn)擊小圖顯示大圖</h4>
<p>
<a rel="example_group" href="example/11.jpg" title="Lorem ipsum dolor sit amet"><img alt="" src="example/1.jpg" /></a>
<a rel="example_group" href="example/22.jpg" title=""><img alt="" src="example/2.jpg" /></a>
<a rel="example_group" href="example/44.jpg" title=""><img alt="" src="example/4.jpg" /></a>
</p>
<p>
<a rel="example_group" href="example/33.jpg" title=""><img alt="" src="example/3.jpg" /></a>
<a rel="example_group" href="example/8_b.jpg" title=""><img alt="" src="example/8_s.jpg" /></a>
<a rel="example_group" href="example/9_b.jpg" title=""><img alt="" src="example/9_s.jpg" /></a>
</p>
</div>
<div><p> </p></div>
</body>
</html>
以上就是為大家分享的jQuery實(shí)現(xiàn)點(diǎn)擊小圖顯示大圖效果代碼,希望大家可以喜歡。
- jQuery實(shí)現(xiàn)等比例縮放大圖片讓大圖片自適應(yīng)頁(yè)面布局
- 基于jquery的防止大圖片撐破頁(yè)面的實(shí)現(xiàn)代碼(立即縮放)
- jQuery+css實(shí)現(xiàn)的點(diǎn)擊圖片放大縮小預(yù)覽功能示例【圖片預(yù)覽 查看大圖】
- jQuery實(shí)現(xiàn)鼠標(biāo)滑過(guò)商品小圖片上顯示對(duì)應(yīng)大圖片功能【測(cè)試可用】
- jQuery實(shí)現(xiàn)鼠標(biāo)滑過(guò)預(yù)覽圖片大圖效果的方法
- jQuery實(shí)現(xiàn)大圖輪播
- jQuery實(shí)現(xiàn)的小圖列表,大圖展示效果幻燈片示例
- jquery插件jquery.LightBox.js實(shí)現(xiàn)點(diǎn)擊放大圖片并左右點(diǎn)擊切換效果(附demo源碼下載)
- jQuery實(shí)現(xiàn)點(diǎn)擊小圖片淡入淡出顯示大圖片特效
- jQuery實(shí)現(xiàn)點(diǎn)擊查看大圖并以彈框的形式居中
- 基于jQuery插件實(shí)現(xiàn)點(diǎn)擊小圖顯示大圖效果
- jquery實(shí)現(xiàn)移動(dòng)端點(diǎn)擊圖片查看大圖特效
- jquery 圖片點(diǎn)擊放大預(yù)覽功能詳解
相關(guān)文章
jQuery Easyui 下拉樹(shù)組件combotree
項(xiàng)目中做角色授權(quán)時(shí),需要做一個(gè)下拉框帶樹(shù)結(jié)構(gòu)的 并且可以多選的組件,就想到了easyui的combotree,下面通過(guò)實(shí)例代碼給大家介紹下Easyui 下拉樹(shù)組件combotree2016-12-12
jQuery滾動(dòng)監(jiān)聽(tīng)實(shí)現(xiàn)商城樓梯式導(dǎo)航效果
這篇文章主要介紹了jQuery滾動(dòng)監(jiān)聽(tīng),實(shí)現(xiàn)商城樓梯式導(dǎo)航,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2017-03-03
jQuery EasyUI 頁(yè)面加載等待及頁(yè)面等待層
這篇文章主要介紹了jQuery EasyUI 頁(yè)面加載等待及頁(yè)面等待層,代碼簡(jiǎn)單易懂,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2017-02-02
基于jquery實(shí)現(xiàn)拆分姓名的方法(純JS版)
jquery拆分姓名處理程序如下,純js實(shí)現(xiàn)的,感興趣的朋友可以參考下哈,希望對(duì)你有所幫助2013-05-05
基于Jquery的仿照f(shuō)lash放大圖片效果代碼
基于Jquery的仿照f(shuō)lash放大圖片效果代碼,需要的朋友可以參考下。2011-03-03
jQuery實(shí)現(xiàn)簡(jiǎn)單彈幕效果
這篇文章主要為大家詳細(xì)介紹了jQuery實(shí)現(xiàn)簡(jiǎn)單彈幕效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2019-11-11
jq選項(xiàng)卡鼠標(biāo)延遲的插件實(shí)例
jq選項(xiàng)卡鼠標(biāo)延遲的插件實(shí)例,需要的朋友可以參考一下2013-05-05
通過(guò)jquery-ui中的sortable來(lái)實(shí)現(xiàn)拖拽排序的簡(jiǎn)單實(shí)例
下面小編就為大家?guī)?lái)一篇通過(guò)jquery-ui中的sortable來(lái)實(shí)現(xiàn)拖拽排序的簡(jiǎn)單實(shí)例。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2016-05-05
如何使用jQuery技術(shù)開(kāi)發(fā)ios風(fēng)格的頁(yè)面導(dǎo)航菜單
這篇文章主要介紹了如何使用jQuery技術(shù)開(kāi)發(fā)ios風(fēng)格的頁(yè)面導(dǎo)航菜單,需要的朋友可以參考下2015-07-07
JQuery判斷checkbox是否選中及其它復(fù)選框操作方法合集
這篇文章主要介紹了JQuery判斷checkbox是否選中及其它復(fù)選框操作方法合集,本文匯總了網(wǎng)上解決這個(gè)問(wèn)題比較好的幾篇文章,需要的朋友可以參考下2015-06-06

