Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically fill nanobar #59

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

onecrayon
Copy link

This is an alternative approach to PR #56. Instead of explicitly starting and stopping the nanobar, you simply pass autoRun: true to the instantiation options. The nanobar will then start filling automatically (never reaching 100) until nanobar.go(100) is called.

When set to `true`, the progress bar will automatically start filling as soon as it is instantiated (but will never reach 100% width). To end the progress, call `nanobar.go(100)` per typical usage. For instance, if you were using jQuery you might do something like this when executing an AJAX request:

    var nano = new Nanobar({ autoRun: true })
    $.get('/some/url').always(function () {
        nano.go(100)
    })
Also updated the ReadMe info about gzipped file size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant