matdutour:progress-button

Easy to use helper to display a nifty progress button


Install
meteor add matdutour:progress-button@=0.1.16

Documentation

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();
  }
});