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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:41:00+00:00 2026-06-15T17:41:00+00:00

How do I find all the ul elements within a particular div that have

  • 0

How do I find all the ul elements within a particular div that have greater than 6 li children and add an attribute of the UL element (i.e. data-theme=”d”)

<div id="dicCntr">
    <ul id="ul1">
        <li id="li1">A</li>
        <li id="li2">A</li>
        <li id="li3">A</li>
        <li id="li4">A</li>
        <li id="li5">A</li>
        <li id="li6">A</li>
        <li id="li7">A</li>
        <li id="li8">A</li>
        <li id="li9">A</li>
    </ul>
    <ul id="ul2">
        <li id="li10">B</li>
        <li id="li11">B</li>
    </ul>
    <ul id="ul3">
        <li id="li12">C</li>
        <li id="li13">C</li>
        <li id="li14">C</li>
        <li id="li15">C</li>
        <li id="li16">C</li>
        <li id="li17">C</li>
        <li id="li18">C</li>
    </ul>
    <ul id="ul4">
        <li id="li19">D</li>
        <li id="li20">D</li>
    </ul>

</div>
  • 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-15T17:41:00+00:00Added an answer on June 15, 2026 at 5:41 pm
    $('#dicCntr ul').filter(
        function() {
            return $(this).children().length > 6;
        }).attr('data-theme', 'd');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a plugin that finds all img elements within a given parent element.
Let's say i need to find all .bar elements inside an element that's assigned
I want to hide all elements within a div which have class name starting
What I want: Within $myElement find all elements with class .myClass and attribute display:none
I need to find all a elements within .paginate and add a class to
I am looking a better method than find to find all the elements within
I'm trying to find and collect all the elements that meet these requirements: var
I'm trying to find all element that contains all words in a phrase after
I have a std::vector with the element as pair and need to find all
I'm using XOM with the following sample data: Element root = cleanDoc.getRootElement(); //find all

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.