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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:33:21+00:00 2026-05-22T01:33:21+00:00

Confusing title, huh? I tried to explain it as best as i could. What

  • 0

Confusing title, huh? I tried to explain it as best as i could.

What i mean is, if i have a menu like this:

<ul>
    <li> Home </li>
    <li class="current"> Portfolio </li>
    <li> Store </li>
    <li> About </li>
</ul>

and use the .next() method to get the next element FROM the current one:

$('ul li.current').next()

the result selector is:

ul li.current.next()

instead of a real selector. I mean, i can’t target ul li.current.next() with CSS (and therefore it isn’t a “real” selector). The real selector would look like ul li.

Is there any way to get the “real” selector of the next element?

  • 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-22T01:33:22+00:00Added an answer on May 22, 2026 at 1:33 am

    If you want the equivalent CSS selector, it would be:

    ul li.current + li
    

    See: Adjacent sibling selector

    Note: Not supported in IE6.

    Also note that jQuery does not use CSS selectors to match all the elements. The selector syntax is just similar (it is a superset) to CSS because it seemed to be the most natural way. It uses methods provided by the browser (e.g. querySelectorAll) where it can but it also has to traverse the DOM in order to find the elements.

    E.g. you can never match $('td').closest('tr') with CSS as you cannot “move up” with CSS.

    I hope this answers your question, if not please clarify it.

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

Sidebar

Related Questions

the title might be a little bit confusing, let me explain, ;) I have
The title may have been confusing, but please let me explain: Currently when I
Perhaps a confusing title but let me explain the issue through steps: I have
The title sounds confusing.. but im sure this is possible! I have one button,
I know the title of this post is somewhat confusing, but I could not
To explain confusing title, here is the deal. I have user control which has
I apologize for the confusing post Title. This is what I mean: Lets say
Hello everybody and sorry for the rather confusing question-title. I have a Hibernate Class
the title of this post might be confusing.I'll try be best to clarify it.
A confusing title I know. Let me explain. I have to marshal an array

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.