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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:18:06+00:00 2026-05-26T17:18:06+00:00

I know it is ugly, but I need to find out how to get

  • 0

I know it is ugly, but I need to find out how to get the attribute of <a> tag, of each <li> that has a <span> with class jqx-checkbox-check-checked, if the <li> contains another set of <ul><li>. Only direct <span> will be check for the desired class(jqx-checkbox-check-checked)

This is the code sample:

<li>
    <span></span>
    <div>
        <div>
            <div class="jqx-checkbox-default jqx-rc-all">
                <span  class="jqx-checkbox-check-checked"></span>
            </div>
        </div>
    </div>
    <span class="jqx-rc-all jqxtree item">
        <a href="5.1"><b style="color:black"> item1</b></a>
    </span>
    <ul class="jqx-tree-dropdown" >
        <li >
            <span class="jqx-tree-item-arrow-collapse jqx-disableselect"></span>
            <div class="chkbox jqx-checkbox">
                <div>
                    <div class="jqx-checkbox-default jqx-rc-all">
                        <span  class="jqx-checkbox-check-checked"></span> 
                    </div>
                </div>
            </div>
            <span class="jqx-rc-all jqx-tree-item">
                <a href="5.1.1"> item2 </a>
            </span>
        </li>
        <li >
            <span class="jqx-tree-item-arrow-collapse jqx-disableselect"></span>
            <div class=""><div>
            <div class="jqx-checkbox-default jqx-rc-all" >
                <span class="jqx-checkbox-check-checked"></span>
            </div></div></div>
            <span class="jqx-rc-all jqx-tree-item">
                <a href="5.1.2"><b style="color:black"> item3</b></a>
            </span>
        </li>
    </ul>
</li>
</ul>
</li>

I know it is not simple! but if someone can show me the right jquery approach, I will be more then grateful

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

    I dont fully understand your question – but I think you need to have a read of the following jQuery methods :

    • closest()
    • next()
    • find()

    Using a combination of those you might be able to get a handle on the object you need

    Done it :

    $('.jqx-checkbox-check-checked').each(function(){
        alert($(this).parent().parent().parent().next().find('a')
              .attr('href'));
    });
    

    Working example : http://jsfiddle.net/manseuk/CEYXc/

    Your HTML is all over the place …

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

Sidebar

Related Questions

I know that Phonegap has an event for back button, but it's only available
I know that this sort of question has been asked here before, but still
I know it's ugly, but i need to compile a perl script on windows
I know how to write the request I need in SQL but can't find
Know this might be rather basic, but I been trying to figure out how
One thing that I find most annoying about OOP is that whenever you need
I asked a question related to this one previously but I need to know
I need to resize/crop images in different resolutions for Android App. I know, that
I know it may sound very strange, but I need to know if there
I'm looking for a library that has functionality similar to Perl's WWW::Mechanize , but

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.