Skip to content

mathieudutour/Meteor-progress-button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A nifty progress button from Codrops

Installation

$ meteor add matdutour:progress-button

Usage

{{#progress_button class="myClass" id="myId" type="submit"}}
	Login
{{/progress_button}}

// to animate the button add the corresponding class

var button = new ProgressButton("myId", {duration : 1200});
button.loading();
button.notLoading();
button.error(function(){});
button.success(true, function(){});

// for example :

var button = new ProgressButton("myId");
Meteor.loginWithPassword(email, password, function (err) {
  if (err) {
    console.log(err);
    button.error();
  } else {
    button.success();
  }
});

About

Easy to use helper to display a nifty progress button

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published