mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
Listen on both keyup and change events
This commit is contained in:
parent
31254f416a
commit
9e7682fab1
1 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ ShoutboxController.prototype.init = function (options) {
|
|||
self.$input = self.$context.find(".shout_input");
|
||||
self.$button = self.$context.find('input[type="submit"]');
|
||||
self.$messageBox = null;
|
||||
self.$input.change(function () {
|
||||
self.$input.bind("keyup change", function () {
|
||||
if (self.$input.val().length > 100) {
|
||||
self.disableShoutbox();
|
||||
} else {
|
||||
|
@ -61,7 +61,7 @@ ShoutboxController.prototype.isDisabled = function () {
|
|||
// Disables Input Button
|
||||
ShoutboxController.prototype.disableShoutbox = function () {
|
||||
var chars = this.$input.val().length;
|
||||
this.writeMessage(["Shout message length exceeded (",chars,"/100)"].join(""));
|
||||
this.writeMessage(["Maximum shout length exceeded (",chars,"/100)"].join(""));
|
||||
this.$button.prop("disabled", true);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue