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 ?

George


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:
> http://www.malsup.com/jquery/expr/
> 
> Mike
> 
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JQuery-selector-to-detect-focus-tf2311127.html#a6427103
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to