The results of selector and find in jQuery are different?

as shown in the figure
there should be only one a, but it is normal to use find, using $("- sharpcrumbs a"). Size () shows 2. What is the reason?

Apr.27,2022

do you have two elements whose id is crumbs?


should be that there are two same crumbs names of ID on the page, otherwise it is impossible to count the difference
$("- sharpcrumbs a"). Size () will count a
$("- sharpcrumbs") under all crumbs. Find ("a"). Size () only counts all a

under the first crumbs.
Menu