我有一个“邮政”纽芬兰语,在文本被打入文字区时,可以激活(从蓝色到颜色,从残疾到残疾)。
This works fine but I would like the text area to detect when there is nothing in the text area. So let s say I typed "abc" into the text area.. the submit button would become active but let s say I now delete all the text.. The button is still active.. well not fully as I have this:
commentButton.prop({ disabled: commentBox.val() == 0 });
不能在案文中提交任何内容。 问题是,提交国仍然有颜色,没有回到表面上不活跃的国家。
因此,我要谈谈我的问题。
Can I set up something that will activate and start listening as soon as i focus in the text area and type and know when I ve deleted everything from the text area?
这样,我就可以说,如果案文全部删除,那么就删除了彩色邦纽顿的地图集,并添加模糊邦纽顿的地图集。
这也适用于白人空间。
我目前的法典是:
www.un.org/Depts/DGACM/index_french.htm
.activeCommentButton = coloured submit button
.commentButton = blurred submission button
$(".microposts").off().on("focus", ".comment_box", function () {
$(this).prop("rows", 7);
$(this).parent().find(".activeCommentButton").removeClass("activeCommentButton").addClass("commentButton");
var commentBox = $(this),
form = $(this).parent(),
cancelButton = form.children(".commentButtons").children(".cancelButton"),
commentButton = form.children(".commentButtons").children(".commentButton");
$(this).removeClass("comment_box").addClass("comment_box_focused").autoResize();
form.children(".commentButtons").addClass("displayButtons");
commentButton.prop({
disabled: true
});
commentBox.off().on("keyup keypress input change", function () {
commentButton.prop({
disabled: commentBox.val() == 0
});
commentButton.removeClass("commentButton").addClass("activeCommentButton");
});
cancelButton.click(function () {
commentBox.removeClass("comment_box_focused").addClass("comment_box");
form.children(".commentButtons").removeClass("displayButtons");
commentBox.val("");
});
});
幼儿园