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

実行結果

InnerFade with Jquery | 設置サンプル

ニュースティッカー


画像スライドショー


設置サンプルのソース

<!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>InnerFade with Jquery | 設定サンプル</title>
      <link rel="stylesheet" href="/content/lib/global.css"  type="text/css" media="all" />
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
      <script type="text/javascript" src="/content/lib/jquery/jquery.innerfade.js"></script>
      <script type="text/javascript">
         $(document).ready(
            function(){
               /* ニュースティッカー */
               $('#news').innerfade({
                  animationtype: 'slide',
                  speed: 750,
                  timeout: 2000,
                  type: 'random',
                  containerheight: '1em'
               });
               /* 画像スライドショー */
               $('ul#portfolio').innerfade({
                  speed: 1000,
                  timeout: 5000,
                  type: 'sequence',
                  containerheight: '220px'
               });
               
               $('.fade').innerfade({
                  speed: 1000,
                  timeout: 6000,
                  type: 'random_start',
                  containerheight: '1.5em'
               });
               
               $('.adi').innerfade({
                  speed: 'slow',
                  timeout: 5000,
                  type: 'random',
                  containerheight: '150px'
               });
            }
         );
      </script>
      <style type="text/css">
         li { list-style:none; margin:0; padding:0; }
         li a { text-decoration:none; }
         /* Listen */
         ul#news { border:1px solid #ccc; padding:2em; background: #fffeb8; }
         ul#portfolio li img{ border:1px solid #ccc; padding:4px; }
      </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 &amp; JavaScript Room</a> :: 設置サンプル</h1>
<h3 class='h'>実行結果</h3>
      <h1><a href='http://medienfreunde.com/lab/innerfade/'>InnerFade with Jquery</a> | 設置サンプル</h1>
      <h2>ニュースティッカー</h2>
      <ul id="news">
         <li><a href="#n1">ニュース1</a></li>
         <li><a href="#n2">ニュース2</a></li>
         <li><a href="#n3">ニュース3</a></li>
         <li><a href="#n4">ニュース4</a></li>
         <li><a href="#n5">ニュース5</a></li>
         <li><a href="#n6">ニュース6</a></li>
         <li><a href="#n7">ニュース7</a></li>
         <li><a href="#n8">ニュース8</a></li>
         <li><a href="#n9">ニュース9</a></li>
      </ul>
      <br style="float:none;clear:both;" />
      <h2>画像スライドショー</h2>
      <ul id="portfolio">
         <li><a href="http://www.flickr.com/photos/22559849@N06/2974008614/" title="くまさんケーキ by php_javascript_room, on Flickr"><img src="http://farm4.static.flickr.com/3222/2974008614_736e2d5b50_m.jpg" width="240" height="180" alt="くまさんケーキ" /></a></li>
         <li><a href="http://www.flickr.com/photos/22559849@N06/2973155055/" title="クリスピー・クリーム・ドーナツ by php_javascript_room, on Flickr"><img src="http://farm4.static.flickr.com/3141/2973155055_4cf4370939_m.jpg" width="240" height="180" alt="クリスピー・クリーム・ドーナツ" /></a></li>
         <li><a href="http://www.flickr.com/photos/22559849@N06/3053382326/" title="バースデーケーキ@銀座GINTO by php_javascript_room, on Flickr"><img src="http://farm4.static.flickr.com/3247/3053382326_d457fa52ee_m.jpg" width="240" height="180" alt="バースデーケーキ@銀座GINTO" /></a></li>
         <li><a href="http://www.flickr.com/photos/22559849@N06/3055162547/" title="ダークチェリーモカ@STARBUCKS by php_javascript_room, on Flickr"><img src="http://farm4.static.flickr.com/3023/3055162547_cde4e8921e_m.jpg" width="240" height="180" alt="ダークチェリーモカ@STARBUCKS" /></a></li>
         <li><a href="http://www.flickr.com/photos/22559849@N06/2973352946/" title="メロンソーダとカフェオレ@CAFE EAT代官山 by php_javascript_room, on Flickr"><img src="http://farm4.static.flickr.com/3174/2973352946_d3589b717e_m.jpg" width="240" height="180" alt="メロンソーダとカフェオレ@CAFE EAT代官山" /></a></li>
         <li><a href="http://www.flickr.com/photos/22559849@N06/2971768652/" title="Giotto@3 by php_javascript_room, on Flickr"><img src="http://farm4.static.flickr.com/3025/2971768652_b9b3b7ddda_m.jpg" width="240" height="180" alt="Giotto@3" /></a></li>
      </ul>
      <br style="float:none;clear:both;" />
   </body>
</html>