I am looking for a cross-browser method - I know that IE has something (I already forgot that), and the way to do it in Mozilla is probably related to the focusNode function I found, which seems to be related to select text.
The methods related to jQuery or another common JS library are fine with me.
Thanks!
Open an optional selector plugin for jQuery, it includes a: focus selector that suits your needs. You can only use the implementation of this selector if you are not the rest.
, jQuery.
, . , , ( Karl Rudd ) . , DOM.
var currentFocus = null; $ (': input'). focus (function() { currentFocus = this; }). blur (function() {
currentFocus = null;
});