mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
add animation to leaderboard
This commit is contained in:
@@ -8,3 +8,4 @@ autopublish
|
||||
insecure
|
||||
preserve-inputs
|
||||
random
|
||||
animation
|
||||
|
||||
@@ -12,12 +12,13 @@ body {
|
||||
|
||||
#outer {
|
||||
width: 600px;
|
||||
margin: 0 auto;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.player {
|
||||
cursor: pointer;
|
||||
padding: 5px;
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.player .name {
|
||||
|
||||
@@ -25,6 +25,10 @@ if (Meteor.isClient) {
|
||||
|
||||
'click input.inc': function () {
|
||||
Players.update(Session.get("selected_player"), {$inc: {score: 5}});
|
||||
},
|
||||
|
||||
rendered: function () {
|
||||
AnimatedEach.apply(this.$('.leaderboard'), ['move']);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user