• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means someone made a syntax error. Most likely that > should be a :.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. :input[type="text"] can be reduced to :text.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!