.find() vs. .children(): which one should you use?

jQuery offers two functions to find children in an element: .find() and .children(). .find() will look through all children of an element while .children() will only look at immediate children. <ul> <li> <p></p> </li> <li> <p></p> </li> <li> <p></p> </li> </ul> In the snippet above, $(‘ul’).children(‘p’) wouldn’t return anything, while $(‘ul’).find(‘p’) would return all three […]