瀏覽代碼

Chain jQuery methods for show and render of onChatRoomMessage

ichim-david 12 年之前
父節點
當前提交
e635fb4fc4
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      converse.js

+ 5 - 5
converse.js

@@ -1049,15 +1049,15 @@
         },
 
         show: function () {
-            this.$el.css({'opacity': 0});
-            this.$el.css({'display': 'inline'});
-            this.$el.animate({opacity: '1'}, 200);
+            this.$el.css({'opacity': 0,
+                          'display': 'inline'})
+                    .animate({opacity: '1'}, 200);
             return this;
         },
 
         render: function () {
-            this.$el.attr('id', this.model.get('box_id'));
-            this.$el.html(this.template(this.model.toJSON()));
+            this.$el.attr('id', this.model.get('box_id'))
+                    .html(this.template(this.model.toJSON()));
             return this;
         }
     });