実行結果
設置サンプルのソース
<!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.3.2/jquery.min.js" ></script>
<script type="text/javascript" src="/content/lib/jquery/jquery.imageZoom.js"></script>
<script type="text/javascript">
$(function(){
$("#jquery-image-zoom-example").imageZoom();
});
</script>
<style type="text/css">
div.jquery-image-zoom {
line-height: 0;
font-size: 0;
z-index: 10;
border: 5px solid #fff;
margin: -5px;
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
div.jquery-image-zoom a {
background: url(/content/img/ajax/jquery.imageZoom.png) no-repeat;
display: block;
width: 25px; height: 25px;
position: absolute;
left: -17px;
top: -17px;
/* IE-users are prolly used to close-link in right-hand corner */
*left: auto;
*right: -17px;
text-decoration: none;
text-indent: -100000px;
outline: 0;
z-index: 11;
}
div.jquery-image-zoom a:hover {
background-position: left -25px;
}
div.jquery-image-zoom img,
div.jquery-image-zoom embed,
div.jquery-image-zoom object,
div.jquery-image-zoom div {
width:100%; height:100%;
}
</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><a href='http://andreaslagerkvist.com/jquery/image-zoom/'>Image Zoom 2.0</a> | 設置サンプル</h1>
<!-- CODE -->
<div id="jquery-image-zoom-example">
<!-- テキストリンク -->
<ul>
<li><a href="http://farm4.static.flickr.com/3215/3141100545_e21269fb11_m.jpg">白レバー串みそ焼き@高庵</a></li>
<li><a href="http://farm4.static.flickr.com/3576/3644950182_2fa2392a36.jpg">冬瓜の煮物@懐石 川端</a></li>
<li><a href="http://farm4.static.flickr.com/3196/3141100631_e7828009fc_o.jpg">揚げ物@高庵</a></li>
</ul>
<!-- 画像リンク -->
<ul>
<li><a href="http://farm4.static.flickr.com/3572/3644950048_35e8beb36f_o.jpg"><img src="http://farm4.static.flickr.com/3572/3644950048_4fdb3df644_t.jpg" alt="ホエー豚丼@ホエー豚亭 東京 青山" /></a></li>
<li><a href="http://farm4.static.flickr.com/3298/3644142587_91406389bd_o.jpg"><img src="http://farm4.static.flickr.com/3298/3644142587_d865587968_t.jpg" alt="ホエー豚丼 トムチーズがけ@ホエー豚亭 東京 青山" /></a></li>
<li><a href="http://farm4.static.flickr.com/3341/3644950008_fb38bc6b72_o.jpg"><img src="http://farm4.static.flickr.com/3341/3644950008_ff30744526_t.jpg" alt="ホエー豚丼@ホエー豚亭 東京 青山 " /></a></li>
</ul>
</div>
<!-- / CODE -->
</div>
</body>
</html>