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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:42:46+00:00 2026-06-01T13:42:46+00:00

I have the following html: <ul id=tree3 class=checkboxTree[1] checkboxTree> <li class=collapsed> <li class=collapsed> <li

  • 0

I have the following html:

<ul id="tree3" class="checkboxTree[1] checkboxTree">
 <li class="collapsed">
 <li class="collapsed">
 <li class="collapsed">
 <li class="collapsed">
 <li class="collapsed">
 <span>
 <input class="checktree" type="checkbox" value="19" fullname="MyName">

and i am trying to capture the change event of the checkbox. This works fine:

$(".checktree").change(function () {
    UpdateSelectedList();
});

but I need to scope it as i have multiple “.checktree” on the page. I tried doing this:

$("#tree3 > .checktree").change(function () {
    UpdateSelectedList();
});

or this:

$("ul#tree3 > .checktree").change(function () {
    UpdateSelectedList();
});

but they didn’t seem to fire. Can someone suggest what is wrong with the above selectors ?

  • 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-01T13:42:47+00:00Added an answer on June 1, 2026 at 1:42 pm

    the > element in selector means child of. Since your .checktree isn’t a direct child of #tree3, it’s not working. Try #tree3 .checktree or #tree3 > li > span > .checktree if you want the exact match.

    jQuery Child Selector vs jQuery Descendent Selector

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

Sidebar

Related Questions

I have the following HTML generated by an ASP.NET repeater: <table> <tr> <td><input type=hidden
I have following HTML: <form action=/Config.aspx/SDKHome/SaveSections id=SaveSections method=post> <input name=[0].SchemaName type=hidden value=contactSection /> <ul
i have following HTML code:- <table class=results> <tr> <td> <a href=..>link</a><span>2nd Mar 2011</span><br>XYZ Consultancy
I have following HTML <tr id=r1 class=l1> <td><img class=plusminus id=r1c1 src=assets/images/plus.png border=0 />3/10/12</td> <td></td>
I have the following HTML: <span id=UnitCost5>$3,079.95 to $3,479.95</span> And i want to use
I have the following HTML containing a drop down list (single selection) <script type="text/javascript">
I have the following XPath to match authors name in an Amazon page: //div[@class='pTitle']/span[@class='small
I have following HTML <div id=finalTree> <ul> <li class=last style=display: list-item;> <a id=DataSheets href=#>Data
I have following HTML layout <html> <head> <title></title> <meta http-equiv=Content-Type content=text/html; charset=UTF-8> <style type=text/css>
I have the following snippet in one of my html pages : <div class=inputboximage>

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.