Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes HTML, CSS and JavaScript and the fly likes How to read $(first-child").focus();" title="" /> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to read $("#myid :input[type= Watch "How to read $("#myid :input[type= New topic
Author

How to read $("#myid :input[type='text']>first-child").focus();

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1050

how to read How to read $("#myid :input[type='text']>first-child").focus();

from the code it seems its giving focus to the first textbox but what does the greater sign mean here?

http://www.lifesbizzare.blogspot.com || OCJP:81%
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

It means someone made a syntax error. Most likely that > should be a :.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

P.S. :input[type="text"] can be reduced to :text.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to read $("#myid :input[type='text']>first-child").focus();
 
Similar Threads
Input element focus (IE)
Focus for an html array input
dynamically add attributes
Trying out jquery, but things are not working out
Display data from database to jsp page.