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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:21:30+00:00 2026-05-10T19:21:30+00:00

So my list looks something like this: <div=list> <ul> <li class=page item>Parent 1 <ul>

  • 0

So my list looks something like this:

<div='list'>   <ul>     <li class='page item'>Parent 1       <ul>         <li class='page item'>Child of Parent 1 and Parent of Grandchild           <ul>             <li class='page item'>Grandchild</li>           </ul>         </li>       </ul>     </li>   </ul> </div> 

This is through WordPress’ list_wp_pages along with a custom CSS suckerfish-like dropdown CSS code. Nothing can be changed in the unordered list itself, so I need to find a way to add a CSS style to only child pages that are also parents (Child of a Parent 1…).

I’ve been trying to add an arrow icon only to child pages that have child pages of their own. I figured that I could use:

$('#target').addClass('newclass');  

to add an extra class with an arrow icon as a background image.

Thanks!

  • 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. 2026-05-10T19:21:31+00:00Added an answer on May 10, 2026 at 7:21 pm
    $('#target li').each(function() {     if ( $('ul:eq(0)', this).length > 0 ) {         $(this).addClass('class_name');     } }); 

    Checks every list item under #target to see if it has at least one child unordered list, and if it does, then it adds a class name to the list item it just checked.

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

Sidebar

Related Questions

I have an html form that looks something like this: <div class=field> <input id=product_name
I have html that looks something like this: <div> <table> <tr onclick=show();> <td class=cell>Click
The normal JSON approach looks something like this: { list: [ { header1: some
I have a list like this: <ul> <li id=adm-thumb onclick=javascript:addBanner('bowling.jpg');> <div class=adm-tick></div> <img src=img/banners/bowling.jpg
My original HTML looks something like this: <h1>Page Title</h1> <h2>Title of segment one</h2> <img
I have this long list of checkboxes with specific labels that look something like
I have this long list of checkboxes with specific labels that look something like
I have a standard list view setup with backbone that looks something like below.
My list looks like this : var list = new Ext.List({ fullscreen: true, itemTpl
By default, the ordered list looks like this: There are some spacing on the

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.