Possible Duplicate:
Jquery Unfocus
Have a form with just one password field tag, and as I use palceholder, I don't want to have automatic input focus. How can I set no focus at all within jquery?
Thanks, Markus
I'm not fully clear on what you need, but I think you're looking for something like this:
$("input").blur();
That will remove the focus from any input
element that may have it.
You can disable the field. $('input.my-input').attr('disabled', true);
Then re-enable it when you want to allow input (on click or whatever). You'd have to use some CSS (.my-input:disabled { ... }
) to make sure the browser doesn't grey it out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With