What is the difference between $('p').find('a') and $('p').children('a')?
find() traverses only one level down, whereas children() selects anything inside the original element
$('p').find('a') finds all paragraphs inside links, whereas $('p').children('a') finds links within paragraph tags
.find() always searches the entire DOM tree, regardless of the original selection .children() searches only the immediate childern of an element
children() traverses only one level down, whereas find() selects anything inside the original element Source: https://api.jquery.com/find/
children() traverses only one level down, whereas find() selects anything inside the original element