Very similar to How do I find out which DOM element has the focus? except that I'm not trying find the field that has focus, I just need to know if a particular one already has focus. Is that possible?
You can try
$("input#id").is(":focus")
Edit: You should read this post if you plan to use it on older browsers. http://forum.jquery.com/topic/is-the-focus-selector-valid
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