Fix ready event.
parent
86ec22e7f5
commit
5e06a01cac
|
@ -169,9 +169,7 @@ var counters = {
|
|||
deferred.reject();
|
||||
}
|
||||
})
|
||||
.fail(function() {
|
||||
deferred.reject()
|
||||
});
|
||||
.fail(deferred.reject);
|
||||
}
|
||||
else {
|
||||
deferred.reject();
|
||||
|
@ -221,9 +219,12 @@ SocialLikes.prototype = {
|
|||
this.number = 0;
|
||||
this.container.on('counter.' + prefix, $.proxy(this.updateCounter, this));
|
||||
|
||||
this.countersLeft = 0;
|
||||
this.container.children().each($.proxy(function(idx, elem) {
|
||||
this.countersLeft++;
|
||||
var buttons = this.container.children();
|
||||
this.countersLeft = buttons.length;
|
||||
|
||||
this.makeSingleButton();
|
||||
|
||||
buttons.each($.proxy(function(idx, elem) {
|
||||
new Button($(elem), this.options);
|
||||
}, this));
|
||||
|
||||
|
@ -233,8 +234,6 @@ SocialLikes.prototype = {
|
|||
else {
|
||||
this.appear();
|
||||
}
|
||||
|
||||
this.makeSingleButton();
|
||||
},
|
||||
initUserButtons: function() {
|
||||
if (!this.userButtonInited && window.socialLikesButtons) {
|
||||
|
|
Loading…
Reference in New Issue