エレメントを表示する

書式

$(〜).show(speed, func)

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

説明

エレメントを表示するにはshow()を使います。パラメータには表示するまでの速度を指定することができます。省略した場合は瞬時に処理されます。

サンプルコード [実行]

<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 showTag(){
$("#content").show("fast");
}
function hideTag(){
$("#content").hide();
}
// --></script>
</head>
<body>
<h1>表示/非表示</h1>
<form>
<input type="button" value="表示" onClick="showTag()">
<input type="button" value="非表示" onClick="hideTag()">
</form>
<div id="content">[jQuery Sample]</div>
</body>
</html>