Ok, so assuming the div contains only one input there is no reason to
include it.  

 

Anyway I still can't get focus to remain on that input field-any other
suggestions?

 

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: Friday, March 09, 2007 1:29 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] simple - focusing on an input

 

It references the first matching element. It's array notation.

 

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Friday, March 09, 2007 2:24 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] simple - focusing on an input

Thanks for the reply, Francesco.  Your suggestion didn't seem to work-but
what is the purpose of the [0] there?  

 

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Francesco Sullo
Sent: Friday, March 09, 2007 12:25 PM
To: jQuery Discussion.
Subject: Re: [jQuery] simple - focusing on an input

 

Use:

$("#orderFinder input").val('')[0].focus()

--Francesco

Paul ha scritto: 

I'm trying to focus the cursor in a text box at the end of a simple
animation, and it won't.  The cursor shows up temporarily in the box, then
flits away.

 

$("#orderFinder").SlideToggleUp(250, null, 'bounceout');    // show/hide the
div

$("#orderFinder input").val('').focus();                    // reset the
value and focus on the field

 
 
 





  _____  



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

 

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

Reply via email to