[PR]I肢ʼn^Ӓ:ۂ̐肢tɂ{i^Ӓ肪

ProgressText.js

テキストによるプログレスバーを実現するクラスライブラリ

サンプル

その1

new ProgressText('target', 'now progressing', '', ' .', 3, 250)
progress point

その2

new ProgressText('target2', '|', '', '|', 40, 100);
progress point

その3

new ProgressText('target3', 'o', 'rz', '<span style=margin-left:1px;></span>', 100, 50);
くずるれおちるひと
(元ネタ:Slashdot:「orz」、どんなコマンドとして実装しますか? )

使用方法

ProgressText.jsを使用するには、prototype.jsが必要です。

オブジェクトの生成

progressTextObj = new ProgressText(element, before, after, text, maxCount, interval);
element
適用エレメント(オブジェクト or ID)
before
変動部の前に表示する文字列
after
変動部の後に表示する文字列
text
個数を変化させる文字列
maxCount
textを表示する最大個数
interval
textの数を増やす間隔(ミリ秒)

文字列(before, after, text)には、HTMLを使用することができます。

生成直後は動作していません。

動作開始

progressTextObj.start();

動作停止

progressTextObj.stop(text);
text
停止後に表示する文字列 省略した場合は置き換えない

状態確認

pregressTextObj.isMoving();
戻り値
true: 動作中
false: 停止中

ダウンロード

ProgressText.js

ライセンス

個人使用・商用使用・改変 etc ご自由にお使いください。

履歴

2005-11-14
version 1.0 公開
©nuFuaue

[PR]肢Ղ̗p⏉񖳗:KȌ֓܂{iӒ