LoginSignup
1
2

More than 5 years have passed since last update.

MonacaでProgressBarを表示

Posted at

まず、HTMLにProgressBarを表示する場所を用意しておく。

page.html
<div class="progressbar"></div>

続いてJavaScriptでProgressBarを表示する。
処理をしている間だけ表示をさせるために、処理を挟むように下記の二つを書く。

main.js
$(".progressbar").append($("<ons-progress-bar indeterminate>"));

// 処理

$(".progressbar").empty();

処理が軽すぎると、ProgressBarが少しだけ表示されて消えるので、少し気持ち悪い。
これを直す必要があるかも

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2