What is the difference between find() and children() in jQuery?
<div id="d"><ul><li>A</li><li>B</li></ul></div>
console.log($('#d').children().length);
console.log($('#d').find('li').length);
Console output
1
2
Learn more about the similar topics:
| Tutorials |
|---|
| No Content Found. |
| Exercises & Assignments |
|---|
| No Content Found. |
| Interview Questions & Answers |
|---|
| No Content Found. |