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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:17:59+00:00 2026-05-26T19:17:59+00:00

through a list, this is my html code: <ul class=choix-kit_modele_list> <li class=first modele><a href=>Modèle

  • 0

through a list, this is my html code:

<ul class="choix-kit_modele_list">
        <li class="first modele"><a href="">Modèle :</a></li>
        <li><a href="">A1</a></li>
        <li><a href="">A3</a>
            <ul class="choix-kit_type_list">
                <li class="first type"><a href="">Type :</a></li>
                <li><a href="">3 Portes - 1999 à 2003</a></li>
                <li><a href="">3 Portes - 2004 à Aujourd'hui</a></li>
                <li><a href="">5 Portes - 1999 à 2003</a></li>
                <li><a href="">Cabriolet - 2008 à Aujourd'hui</a></li>
                <li class="last"><a href="">Sportback - 2005 à Aujourd'hui</a></li>
            </ul>
        </li>
        <li class="last"><a href="">A4 Berline</a></li>
    </ul>

I would like to select only of the first level of the list, so this is my code, wich select all :

$('.choix-kit_modele_list li > a').not('.choix-kit_type_list li a').each(function(i){
   $(this).css({width: 100});
});

So i said that “select me a of the first ul but not his ul child, via calling them by their respective class. So what’s wrong in my code please ?

Thanks in advance for you help

  • 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-26T19:18:00+00:00Added an answer on May 26, 2026 at 7:18 pm

    The child selector should be between .choix-kit_modele_list and li, because every a is a child of li on all levels:

    $('.choix-kit_modele_list > li a').each(function(i) {
        $(this).css({ width: 100 });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This piece of code is supposed to go through a list and preform some
I know I can loop through a list of strings like this: list<string>::iterator Iterator;
Is it slower to iterate through a list in Java like this: for (int
Can you remove an item from a List<> whilst iterating through it? Will this
So I'm running through a list of things and have code that creates an
I'm going through the Sharded Counters example in Java: http://code.google.com/appengine/articles/sharding_counters.html I have a question
The following asynchronous C# code runs through a list of 7 URLs and tries
I've my HTML codes as <li><button id=1 class=vote btn type=button /></li> <li><button id=2 class=voteUp
I have the following code for showing some images: HTML: <div class=footer-logos> <ul> <li><img
I'm looping through a list of items, and I'd like to get a request

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.