()
| 230 | }); |
| 231 | |
| 232 | function submitChat() { |
| 233 | var val = input.val(); |
| 234 | if ($.trim(val)) { |
| 235 | input.val(""); |
| 236 | // triggering the event manually to avoid the addition of newline character to the textarea: |
| 237 | input.trigger("input").trigger("propertychange"); |
| 238 | chat.submit(val); |
| 239 | } |
| 240 | } |
| 241 | // auto-resize textarea: |
| 242 | input.on("input propertychange", function () { |
| 243 | var $this = $(this); |