Hi, I have a couple of questions about selectors.  I have the
following HTML:

=====

Some <a> elements and <input> elements here.
...
...

<a id="info-1-heading">Information Type 1</a>
<div>
  <div>
    <input class="cat" id="first" type="checkbox"/><label
for="first">First</label>
  </div>
  <div>
    <input class="cat" id="mid" type="checkbox"/><label
for="mid">Middle</label>
  </div>
  <div>
    <input class="info1-cat" id="last" type="checkbox"/><label
for="last">Last</label>
  </div>
</div>

...
...
More <a> elements and <input> elements here.

=====

Question 1:
In the click handler of the first checkbox, I would like to get the
first, middle, and last checkboxes (but not the other checkboxes on
the page). What selector should I use?

Question 2:
In the click handler of the first checkbox, I would like to get the
first <a> element that it finds traversing up the hierarchy (i.e. the
<a> with id="info-1-heading").  What selector should I use?

Thank you.

Reply via email to