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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:08:08+00:00 2026-06-10T19:08:08+00:00

When using Jquery to exclude elements from selection I like to use CSS :not

  • 0

When using Jquery to exclude elements from selection I like to use CSS :not selector because of faster performance :not() VS .not() , but from Jquery 1.8.0 it is not working anymore:(
Is there some other alternative to use with same or better performance (except .not() ) in Jquery? THX!!

This works with Jquery 1.7.2

Fiddle here

But NOT with Jquery 1.8.0

Fiddle here

$(document).ready(function(){
$("ul li:not(:first)").hide();
});
  • 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-10T19:08:10+00:00Added an answer on June 10, 2026 at 7:08 pm

    Pass it an actual CSS3 selector. It’s much faster:

    $("li:not(:first-child)").hide();
    

    Here’s your fiddle: http://jsfiddle.net/E7gBM/1/

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

Sidebar

Related Questions

Using jQuery Nearest Element , I would like to select elements in a circular
Using Jquery 1.6.4. I'm attempting to use css to give my app a clue
I'd like to exclude a set of pages from decoration (using sitemesh 2 and
Desired effect: rows (tr) with class do-not-sort excluded from containment using jQuery.sortable. Current code:
Using jquery, how can I change the color of these elements to red if
Using jQuery (1.7), and not jQueryUI - (how) would it be possible to accomplish
I'm having a Backbone application using Require.js for AMD. I'm loading jQuery from Google
I want to simply exclude some array elements from another array and get the
I am using jQuery UI sortable for a list of elements on a page
I am using http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/ for validation. Validation rules are defined in a following way:

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.