PHP & JavaScript Room :: 設置サンプル

実行結果

設置サンプル

参照:Zoomi!

マウスオーバーで画像ズームアップ(サムネイル画像と拡大画像のURL指定、画像リンクあり)

http://farm4.static.flickr.com/3141/2973155055_385036c286_o.png

マウスオーバーで画像ズームアップ(拡大画像のURLのみ指定)

マウスオーバーで画像ズームアップ(透過GIF使用)

/content/img/dog_white.gif

画像クリックで縮小・拡大切替

http://farm4.static.flickr.com/3222/2974008614_f4b59bf651_o.png

フォルダ内の画像をギャラリー表示

ロールオーバー、アウトで2枚の画像をクロスフェード切替

/content/img/ajax/start.png

設置サンプルのソース

<!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/zoomi.js"></script>
      <script type="text/javascript">
         // <!-- Examples of dynamically calling zoomi -->
         $(function(){
           $('#zoomme img').zoom1().click(function(){
             $(this).zoom2().fadeIn().click(function(){
               $(this).hide(); return false; })
             .end().parent().addClass('red'); return false; });
           for(i=1; i<=5; ++i)
             $('#bleach').append('<img class="zoomi" src="/content/lib/galleryimages/christmas-party-'+i+'.jpg" height="110">');
           $('#bleach img.zoomi').zoomi();
           $('.bw img')
           .zoom1().mouseover(function(){ $(this).zoom2().fadeIn(); })
           .zoom2().mouseout(function(){ $(this).fadeOut(1600); });
         });
      </script>
   <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 &amp; JavaScript Room</a> :: 設置サンプル</h1>
<h3 class='h'>実行結果</h3>
      <div id="wrap" style="margin-left:auto; margin-right:auto; text-align:center;">
         <h1>設置サンプル</h1>
         <p>参照:<a href='http://www.sunsean.com/zoomi/' target="_blank">Zoomi!</a></p>
         <h2>マウスオーバーで画像ズームアップ(サムネイル画像と拡大画像のURL指定、画像リンクあり)</h2>
         <a href="http://www.flickr.com/photos/22559849@N06/2973155055/" title="クリスピー・クリーム・ドーナツ by php_javascript_room, on Flickr">
            <img class="zoomi" 
               src="http://farm4.static.flickr.com/3141/2973155055_4cf4370939_s.jpg"
               alt="http://farm4.static.flickr.com/3141/2973155055_385036c286_o.png" />
         </a>

         <h2>マウスオーバーで画像ズームアップ(拡大画像のURLのみ指定)</h2>
         <img class="zoomi" src="http://farm4.static.flickr.com/3141/2973155055_385036c286_o.png" style="width:100px; height:75px;">

         <h2>マウスオーバーで画像ズームアップ(透過GIF使用)</h2>
         <img class="zoomi" src="/content/img/dog_mini.gif" alt="/content/img/dog_white.gif">

         <h2>画像クリックで縮小・拡大切替</h2>
         <a id="zoomme" href="#" title="Click me to toogle zoomi">
         <img src="http://farm4.static.flickr.com/3222/2974008614_736e2d5b50_s.jpg"
              alt="http://farm4.static.flickr.com/3222/2974008614_f4b59bf651_o.png">
         </a>

         <h2>フォルダ内の画像をギャラリー表示</h2>
         <div id="bleach"></div>

         <h2>ロールオーバー、アウトで2枚の画像をクロスフェード切替</h2>
         <div class="bw">
            <img class="bw" src="/content/img/ajax/end.png" alt="/content/img/ajax/start.png" />
         </div>
      </div>
   </body>
</html>