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

  • Home
  • SEARCH
  • 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 891499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:54:04+00:00 2026-05-15T13:54:04+00:00

Are selectors or functions faster in jQuery? Example: $(‘#something div.else’); // find multiple divs

  • 0

Are selectors or functions faster in jQuery? Example:

$('#something div.else'); // find multiple divs with class .else

or

$('#something').children('div.else');

I’m trying my best to optimize a page with hundreds of returned elements that seems to hang on a certain crappy computer here in the office (that must use Internet Explorer ::shudder::).

  • 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-15T13:54:05+00:00Added an answer on May 15, 2026 at 1:54 pm

    Well in this case, the second’s faster, but, they’re not equivalent. The first finds any descendant div.else, the other finds only direct children that are div.else.

    It depends on your DOM as to which is faster, the equivalent of the second would be this:

    $('#something > div.else');
    

    This uses the child selector. They should be very, very close, and in any case, I doubt a selector descending from an ID is your problem area, I think you’ll find the vast majority of your time in JS is spent elsewhere.

    For diagnosing speed issues, get a profiler, for IE specifically there’s a fantastic free one called dynaTrace AJAX Edition. Grab it, follow the short tutorials on their site…you’ll find where your pain areas in IE are pretty quickly.

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

Sidebar

Ask A Question

Stats

  • Questions 499k
  • Answers 500k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is not pretty but it works: rm -R $(ls… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer Yes. Override the base1 and base2 methods in Derived to… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer No, you can't. Unfortunately, UIEvent doesn't expose any public way… May 16, 2026 at 12:45 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm reviewing a number of jQuery functions that have various implementations of id selection.
I am new to jQuery and I am having trouble with the syntax, selectors
After becoming slightly uncomfortable with multiple calls to the same function, with different parameters
I wonder if there is any optimization I can do to achieve faster SELECTs
I have started to convert a code on my site to jquery from mootols
I am performing a selection on various radio buttons whose class starts with the
I'm not sure whether to use :first or :eq(0) in a selector. I'm pretty
I have a PHP application running in iFrame mode. I am rendering an <fb:multi-friend-selector
I schedule a timer with NSTimer's function in viewWillAppear as follows: minutesTimer = nil;
Based on testing a page with ~220 elements, of which ~200 are checkbox elements,

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.