The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › jQuery .find() method in JS
I need jQuery .find() method in JS, without using jQuery library . . .
This is likely the closest for my limited JS knowledge: https://developer.mozilla.org/en-US/docs/Web/API/document.getElementById
looking at the jquery source you can see that
jQuery.find = Sizzle;
where sizzle is the way jquery handles dom traversing
what you have in jQuery(‘selector1’).find(‘selector2’) is two dom traversals one applied to one element(might be document or a selected element) and the second applied to its children.
to get div.two in jquery with find
with plain js you can do
Thank’s for answers, all done ;)