Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 877809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:40:19+00:00 2026-05-15T11:40:19+00:00

In the example of jQuery’s find() (the doc is at http://api.jquery.com/find/ ) I wonder

  • 0

In the example of jQuery’s find()
(the doc is at http://api.jquery.com/find/)

I wonder why we need it, because, is

$('li.item-ii').find('li')

the same as

$('li.item-ii li')

essentially, all the <li> elements inside the <li> element that has the class item-ii

Similarly

$('#id1').find(".class1 #id2")

is the same as

$('#id1 .class1 #id2")

?

Update: if they are the same, why do we need find() ? is it because mainly when we need to further select some elements when given another element in a variable, so we can do elementFoo.find("...")?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:40:19+00:00Added an answer on May 15, 2026 at 11:40 am

    Yes, these are equivalent. The result is the same, it’s called the descendant selector. Their utility differs a little bit (e.g. using .end(), .andSelf(), etc), but for just selecting elements, you’re finding the same set.

    For kicks, you can also do this:

    $('li', 'li.item-ii')
    

    For your edit: Why do we need it? Sometimes you’re not coming from a selector, quick example:

    $(this).find('.childElementClass')
    

    There are many times you need to find something relatively, not from a known selector (could be a DOM element, this, an iframe document, etc). There are many other traversal functions for this as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

looking at this example of the jquery ui slider http://jqueryui.com/demos/slider/#steps i want to be
At http://docs.jquery.com/UI/Tabs#Example there is a short HTML example of how to use JQuery UI
I've tried to implement the following jquery example: http://jsfiddle.net/xSkgH/5/ onto an HTML page: http://licf.ronaldboadi.com/test.html
Need Example of jquery for sorting... ?
http://jsfiddle.net/nicktheandroid/BcaW3/1/ I'm trying to create a simple canvas version of my jQuery example. When
I have used scrolling script from this site. http://blog.waiyanlin.net/example/jquery/flyingtext.html . I need the animation
The jQuery templates plug-in uses ${foo} syntax ( example in jquery.tmpl doc ): $.tmpl(
I'm going through the peepcode jQuery example ( https://peepcode.com/products/jquery ) and I chose to
In the Jquery example below, I would like to expand $(this) before it is
The following jQuery example should put some text into the div, but it doesn't.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.