Thanks Mike, that answers one question.

So a new :focus selector can be added like this: (for IE only so far. Boo!)

        jQuery.extend(jQuery.expr[':'], {
                focus: "a==document.activeElement"

        // Example of usage: $("INPUT:focus")

Does anyone have an answer to the second question: How to detect which
element has the focus in browsers other than IE ?


malsup wrote:
>> (a) How can we we bolt extra selector definitions to the JQuery library
>> without modifying the JQuery.js file itself.
> You can see an example of adding to jQuery's selection expressions here:
> Mike
> _______________________________________________
> jQuery mailing list

View this message in context:
Sent from the JQuery mailing list archive at

jQuery mailing list

Reply via email to