I have a script, like this:
$(".b").hide();
$(".uid").bind("change", function() {
if($(this).val().length>0) {
$(".b").show();
} else {
$(".b").hide();
}
});
This works as you would expect, but, to get “.b” to show, I have to leave focus of “.uid”. Is there any way I can get “.” to show without clicking outside of “.uid”? It’s a submit button that is hidden until something is entered into the text field and I want it to show up as soon as something is entered into the field without having to click out of the field.
You may use
keyupinstead:http://jsfiddle.net/zerkms/YCGw9/