Guest User

Untitled

a guest
Aug 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. Will jQuery search for the ID before filtering other parameters in the selector?
  2. $('#myID a') // Does this find #myID and filter by a?
  3.  
  4. $('#myID').find('a')
  5.  
  6. $('#myID .myClass')
  7.  
  8. // Take a shortcut and set the context if the root selector is an ID
  9. // (but not if it'll be faster if the inner selector is an ID)
Add Comment
Please, Sign In to add comment