selecting the 'children' that match the criteria
<p>I'd like to select all the checkboxes that are children of where I clicked. For example, in the snippet below, I'd like it to select the first 'is-wine' but not the second. Currently, it doesn't select either.</p>

<p>Any ideas of how to get this working?</p>

<p>thx</p>

<pre><code>&lt;script&gt;
    $(document).ready(function() {

        $('.click-me').on('click',function(){

            console.log('about to set');
            console.log('here is val: ' + $('.chex input.is-wine').attr('checked'));

            if ( $('.chex input.is-wine').children().is(':checked') ) {
                $('.chex input.is-wine').children().attr('checked',false);
            } else {
                $('.chex input.is-wine').children().attr('checked',status);
            }

            console.log('after setting');
        });

    });
&lt;/script&gt;

&lt;body&gt;
    here i am withing sub
    &lt;div id='my-killer-id'&gt;
        &lt;div class='click-me'&gt;click me to start&lt;/div&gt;
        &lt;div class='chex'&gt;
            &lt;input type='checkbox' class='is-wine' /&gt;&lt;br /&gt;
            &lt;input type='checkbox' class='is-coffee' /&gt;&lt;br /&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;div id='other-vals'&gt;
        &lt;div class='chex'&gt;
            &lt;input type='checkbox' class='is-wine' /&gt;&lt;br /&gt;
            &lt;input type='checkbox' class='is-coffee' /&gt;&lt;br /&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/body&gt;
</code></pre>

<p><strong>edit #1</strong></p>

<p>So here is a more realistic markup of what I'm trying to select</p>

<pre><code>&lt;div id='my-killer-id'&gt;
  &lt;div class='click-me'&gt;clicke me to start&lt;/div&gt;
  &lt;div class='chex'&gt;
    &lt;!-- would select this --&gt;
    &lt;input type='checkbox' class='is-wine' /&gt;&lt;br /&gt;
    &lt;input type='checkbox' class='is-coffee' /&gt;&lt;br /&gt;
    &lt;div class='other-things'&gt;
      &lt;!-- would select this --&gt;
      &lt;input type='checkbox' class='is-wine' /&gt;
      &lt;input type='checkbox' class='is-coffee' /&gt;
      &lt;div class='even-more-things'&gt;
        &lt;!-- would select this --&gt;
        &lt;input type='checkbox' class='is-wine' /&gt;
        &lt;input type='checkbox' class='is-coffee' /&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id='other-vals'&gt;
  &lt;div class='chex'&gt;
  &lt;!-- would not select this --&gt;
  &lt;input type='checkbox' class='is-wine' /&gt;&lt;br /&gt;
  &lt;input type='checkbox' class='is-coffee' /&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;/div&gt;
</code></pre>
