Skip to content

Automatically fill nanobar#59

Open
onecrayon wants to merge 3 commits intojacoborus:masterfrom
onecrayon:master
Open

Automatically fill nanobar#59
onecrayon wants to merge 3 commits intojacoborus:masterfrom
onecrayon:master

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.

1 participant