[Notimooライブラリ] 表示時間を指定する

説明

Notimooライブラリで表示時間を指定するにはnotimooオブジェクトのshow()メソッドのオプションパラメータvisibleTimeに表示しているミリ秒 (1秒=1000) を指定します。

サンプルプログラム

【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/notimoo-v1.1.css" type="text/css" media="all">
<link rel="stylesheet" href="css/main.css" type="text/css" media="all">
<script type="text/javascript" src="js/mootools-1.2-core.js"></script>
<script type="text/javascript" src="js/notimoo-v1.1.js"></script>
<script type="text/javascript" src="js/sample.js"></script>
</head>
<body>
<h1>ユーザーに通知</h1>
</body>
</html>


【sample.js】
window.onload = function(){
var notimooManager = new Notimoo();
notimooManager.show({
title: "お読み下さい",
message: "表示時間も指定できます。<br>2秒で消えます。",
visibleTime : 2000
});
}
サンプルを実行
[戻る]