▼Twitterに最近投稿されたつぶやきを自動取得してライブ表示(リアルタイム)します。
<!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>Juitter | 設置サンプル</title>
<link rel="stylesheet" type="text/css" href="/content/lib/global.css" />
<!-- JS -->
<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/juitter/jquery.juitter.js"></script>
<script type="text/javascript" src="/content/lib/jquery/juitter/system.js"></script>
<script type="text/javascript">
$(function() {
$("#twitter").getTwitter({
userName: "cocoism", /* ユーザー名 */
numTweets: 5,
loaderText: "読み込み中...",
slideIn: true,
showHeading: true,
headingText: "最近のつぶやき",
showProfileLink: true
});
});
</script>
<!-- CSS -->
<style type="text/css">
/*JUITTER PLUGIN CSS*/
#juitterContainer{} /*Juitter container*/
#juitterContainer .twittList{margin:0;padding:0;} /* UL that will contain the list of tweets */
/* Bellow the list of tweets "<li>" */
#juitterContainer .twittLI{list-style:none;background:#EEFDEA;margin:0;padding:5px 0 0 0;border-bottom:dashed 1px #CAF8C9;padding:3px;clear:both;height:55px;}
#juitterContainer .twittList A{color:#006600;} /*Links inside the tweets list */
/* Bellow the CSS for the avatar image */
#juitterContainer .juitterAvatar{float:left;border:solid 1px #D3EECA;background:#FFF;margin-right:5px;padding:2px;width:48px;;height:48px;}
#juitterContainer .jRM{float:right;clear:both} /*read it on twitter link*/
#juitterContainer .extLink{} /*CSS for the external links*/
#juitterContainer .hashLink{} /*CSS for the hash links*/
/*end of Juitter CSS*/
</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://juitter.com/'>Juitter - More fun to your website</a> | 設置サンプル</h1>
<p>▼Twitterに最近投稿されたつぶやきを自動取得してライブ表示(リアルタイム)します。</p>
<!-- CODE -->
<div id="juitterContainer"></div>
<!-- / CODE -->
</div>
</body>
</html>