1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-26 03:30:48 +03:00

animate icon

This commit is contained in:
Chiffa 2015-12-30 05:47:38 +05:00
parent 5b93a0fad1
commit c686385c00

View file

@ -26,11 +26,15 @@
update: '.js-toolbar-comments-update',
// Счетчик новых комментариев
counter: '.js-toolbar-comments-count'
counter: '.js-toolbar-comments-count',
// Иконка
icon: '.ls-toolbar-comments-update .fa'
},
classes: {
active: 'active'
active: 'active',
'fa-spin': 'fa-spin'
}
},
@ -80,10 +84,12 @@
*/
update: function() {
this._addClass( this.elements.update, 'active' );
this._addClass( this.elements.icon, 'fa-spin' );
this.options.comments.lsComments( 'load', false, false, function () {
this.updateCounter();
this._removeClass( this.elements.update, 'active' );
this._removeClass( this.elements.icon, 'fa-spin' );
}.bind( this ));
},
@ -122,4 +128,4 @@
this.options.comments.lsComments('scrollToComment', comment);
}
});
})(jQuery);
})(jQuery);