フェードイン

書式

$(〜).fadeIn(speed, func)

speed : 速度("slow", "normal", "fast"かミリ秒)【省略可能】
func : エフェクトが終了した時の処理【省略可能】

説明

フェードイン処理はfadeIn()を使います。パラメータにはフェードイン/フェードアウトまでの速度を指定することができます。

サンプルコード [実行]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<link rel="stylesheet" href="main.css" type="text/css" media="all">
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript"><!--
function fadeIn(){
$("#content").fadeIn("fast");
}
function fadeOut(){
$("#content").fadeOut();
}
// --></script>
</head>
<body>
<h1>フェードイン/フェードアウト</h1>
<form>
<input type="button" value="フェードイン" onClick="fadeIn()">
<input type="button" value="フェードアウト" onClick="fadeOut()">
</form>
<div id="content">[jQuery Sample]<br>エフェクト処理も簡単</div>
</body>
</html>