Template.notificationBadge.helpers({
  count: function () {
    // TODO: find a better way ?
    this._count = this._count || this.count;

    if (this.count !== this._count) {
      $('.notification-count')
        .css({ opacity: 0 })
        .css({ top: '-3px' })
        .animate({ top: '5px', opacity: 1 });  
    }

    return this.count;
  }
});
Template.notificationBadge.helpers({
  count: function () {
    // access template instance instead of 'this', 
    // which only returns the data context
    var self = Template.instance();

    self._count = self._count || this.count;

    if (this.count !== self._count) {
      Meteor.defer(function () {
        $('.notification-count')
          .css({ opacity: 0 })
          .css({ top: '-20px' })
          .animate({ top: '-8px', opacity: 1 });    
      });
      
      self._count = this.count;
    }

    return this.count;
  }
});
Fix animation and count checking
Fix animation and count checking
