[jGrowlライブラリ] メッセージを表示したままにする

説明

jGrowlライブラリでメッセージを表示したままにするには$.jGrowl()の2番目のオプションパラメータstickyにtrueを指定します。

サンプルプログラム

【HTML】
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<link rel="stylesheet" href="css/jquery.jgrowl.css" type="text/css" media="all">
<link rel="stylesheet" href="css/main.css" type="text/css" media="all">
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.jgrowl.js"></script>
<script type="text/javascript" src="js/sample.js"></script>
</head>
<body>
<h1>jGrowlサンプル</h1>
<ul>
<li><a href="#" id="msg1">メッセージ1</a></li>
</ul>
</body>
</html>


【sample.js】
$(function(){
$("#msg1").mouseover(function(){
$.jGrowl("こんな具合に表示されます",{
sticky: true
});
});
});
サンプルを実行
[戻る]