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 7939759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:12:07+00:00 2026-06-03T23:12:07+00:00

I would like to select all elements within a container e.g. a div. It

  • 0

I would like to select all elements within a container e.g. a div. It shouldn’t matter what kind of an element is within the container and it should be possible to select those elements without any classes assigned to them, to stay as flexible as possible.
I want to build this quickly written “logo-ticker” as a jQuery Plugin:

http://apkunden.de/dev/index.html

The goal is to make it possible to use this with any html element, not just imgs. I know a very common way to accomplish this is via the use of a class assigned to any relevant element. But as it turns out I’m a lazy person and I don’t want to assign all those classes :D.

Now I know there is the all selector (“*”) in jQuery and I thought of doing something like this:

    $("#container").find("*");

But then on the jQuery API page there is a warning that the all selector is very slow. Question now is, if it makes sense at all to use the (“*”) selector. If it has that much impact on performance I’d rather not be lazy…

Anyone with experience or advice with this?

Thx.

  • 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-06-03T23:12:08+00:00Added an answer on June 3, 2026 at 11:12 pm

    From the same docs (emphasize mine):

    Caution: The all, or universal, selector is extremely slow, except when used by itself.

    That sentence implies that$(this).find('* > p') is much slower than $(this).find('*'), so I think it’s pretty safe to do that, and I honestly can’t think of any better (as in efficient), since your requirements is to get all elements

    EDIT:

    As per my comment, from the children() docs:

    The .children() method differs from .find() in that .children() only
    travels a single level down the DOM tree while .find() can traverse
    down multiple levels to select descendant elements (grandchildren,
    etc.) as well.

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

Sidebar

Related Questions

I would like to select all elements which are outside of my container div
I would like to select all div elements that are children of the body
I would like to select all elements that have certain attribute or don't have
I would like to select all elements, for example a tags $('a').blabla(); But I
I would like to select all jquery UI button that live inside all <div>
I would like to select with jQuery all td elements of a table given
I would like to be able to select all of the Relationship elements where
I would like to select all elements with direct text contents. So given the
I have a pretty specific scenario where I would like to select all elements
I have a parent element (font) and I would like to select all the

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.