Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

XHGInc/ToProgress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

50 Commits

Repository files navigation

ToProgress

NPM version npm npm

A lightweight (2.2 KB), no-dependency top progress bar library.

Demo

http://djyde.github.io/ToProgress

Screenshot

Desktop

desktop

Mobile

mobile

Quick Start

var options = {
 color: '#EEE',
 duration: 0.2,
 height: '2px'
}
var topbar = new ToProgress(options);

Support

  • IE >= 10
  • Chrome
  • Firefox
  • Safari

Use cases

If you are using ToProgress.js in production, just tell us.

API

new ToProgress(options[,selector])

  • options

    • id - the id of auto-created progress bar element
    • color - progress bar color
    • height - progress bar height
    • duration - increase duration (seconds)
    • position - the progress bar position. top or bottom
  • selector - valid css selector, if is defined, progress bar will be put on the top of the element. Only find the first element.

.increase(progress[,callback])

  • progress - percentage number

.decrease(progress[,callback])

  • progress - percentage number

.setProgress(progress[,callback])

  • progress - percentage number

.reset([,callback])

.finish([,callback])

.getProgress()

return current progress (percentage number)

.show()

.hide()

License

MIT License

About

A lightweight top progress bar

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%

AltStyle によって変換されたページ (->オリジナル) /