実行結果
設置サンプルのソース
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="ja" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<title>設置サンプル</title>
<link rel="stylesheet" type="text/css" href="/content/lib/global.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" ></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js" ></script>
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/base/jquery-ui.css" />
<script type="text/javascript" src="/content/lib/jquery/jquery.gzoom.js" ></script>
<script type="text/javascript" src="/content/lib/jquery/jquery.mousewheel.js" ></script>
<script type="text/javascript">
$(function(){
$("#zoom01").gzoom({sW: 300,
sH: 225,
lW: 1024,
lH: 765,
lightbox:false
});
$(".zoom_no_lbox").gzoom({sW: 300,
sH: 225,
lW: 1024,
lH: 765,
lightbox: true
});
$("#zoom04").gzoom({sW: 300,
sH: 225,
lW: 1024,
lH: 765,
lightbox: true,
zoomIcon: '/content/img/ajax/zoom.png'
});
});
</script>
<style type="text/css">
/* miniZoomPan styles */
.gzoomwrap {
float:left;
margin:0 10px 0 0;
}
.minizoompan {
background: #fff;
position: relative; /* always set to relative or offset() won't work */
border: 1px solid lightgray;
padding: 0;
margin: 0;
}
.minizoompan span.loader { /* the loader label*/
position:absolute;
left:0;
top:0;
z-index: 1;
display: none;
color: #000;
background: #fff;
font: normal 9px Arial, Verdana;
padding: 3px;
}
.minizoompan .zoomIcon { /* the zoom icon */
position:absolute;
cursor:pointer;
left:0;
top:0;
z-index: 1;
display: none;
}
.gzoombutton {
float:left;
cursor:pointer;
}
.gzoomSlider {
float:left;
margin:3px 5px 0 5px;
}
#gzoomoverlay {
position: absolute;
top: 0;
left: 0;
z-index: 90;
width: 100%;
height: 500px;
}
#gzoomlbox {
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 100;
text-align: center;
line-height: 0;
}
#gzoomlbox a img {
border: none;
}
#imagebox {
position: relative;
background-color: #fff;
width: 250px;
height: 250px;
margin: 0 auto;
}
#gzoom-cont-img { padding: 10px; }
#lboximgdatacontainer {
font: 10px Verdana, Helvetica, sans-serif;
background-color: #fff;
margin: 0 auto;
line-height: 1.4em;
overflow: auto;
width: 100%;
padding: 0 10px 0;
padding: 0 10px 10px 10px;
color:#666;
}
#gzoomloading {
position: absolute;
top: 40%;
left: 0%;
height: 25%;
width: 100%;
text-align: center;
line-height: 0;
}
#lboximgdatacontainer #gzoomlbox-image-details {
width: 70%;
float: left;
text-align: left;
}
#gzoom-image-caption { font-weight: bold; }
</style>
<link rel="stylesheet" type="text/css" href="/common/css/example.css"></head>
<body id='example3' class='example'><div class="ads" style="margin:32px auto;text-align:center;"></div><h1 class='h'><a href='/'>PHP & JavaScript Room</a> :: 設置サンプル</h1>
<h3 class='h'>実行結果</h3>
<div id="wrap">
<h1>設置サンプル</h1>
<p>参照:<a href='http://lab.gianiaz.com/jquery/' target='_blank'>jQuery gzoom plugin</a></p>
<p>▼スライダーで画像の倍率を調整できます。画像クリックで、原寸大画像がポップアウト表示されます。</p>
<!-- CODE -->
<div id="zoom01" class="zoom">
<img src="http://farm5.static.flickr.com/4055/5153644500_b95ccefb3f_z.jpg" alt="" title="ミルクレープ" />
</div>
<div id="zoom02" class="zoom zoom_no_lbox">
<img src="http://farm5.static.flickr.com/4017/5153037255_d91f4696f1_z.jpg" alt="" title="ミルクレープはがしたとこ♡" />
</div>
<div id="zoom03" class="zoom zoom_no_lbox">
<img src="http://farm5.static.flickr.com/4037/5150863795_4712c20d63_z.jpg" alt="" title="鴨ネギの溶岩焼き" />
</div>
<div id="zoom04" class="zoom">
<img src="http://farm2.static.flickr.com/1088/5142076100_d7d66bdb26_z.jpg" alt="" title="日本のアイドル食「卵かけごはん」" />
</div>
<br style="clear:both" />
<!-- / CODE -->
</div>
</body>
</html>