title: jQuery click on li with nested ul
body: <p>I have a list within lists. When a user clicks on a list item (<code>&lt;li&gt;</code>), I want the nested <code>&lt;ul&gt;</code> to show up. Before I started adding the nested lists, I just had it where clicking a list item would run a function. Now, clicking any of the nested lists also runs that function. Which makes sense, since they're part of the list item. </p>
  
  <p>Besides wrapping a <code>&lt;span&gt;</code> around the first part of the list item and running the function on that, is there a selector that will let me run something on the parent <code>&lt;li&gt;</code> but not any of its children, specifically not the child lists and list items?</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;ul class="buckets"&gt;        
      &lt;li class="bucket"&gt;
          &lt;img src="arrow_group_collapsed_true.png" class="arrow"&gt;
          &lt;img src="blue_folder.png" class="folder"&gt;
          View all
      &lt;/li&gt;
  
      &lt;li class="bucket"&gt;
          &lt;img src="arrow_group_collapsed_false.png" class="arrow"&gt;
          &lt;img src="blue_folder.png" class="folder"&gt;
          Groups
          &lt;ul style="display: block;"&gt;
              &lt;li id="group_id_15036" class="group_bucket"&gt;
                  &lt;img src="arrow_group_collapsed_true.png" class="arrow"&gt;
                  &lt;img src="blue_folder.png" class="folder"&gt;
                  Group 1
              &lt;/li&gt;
              &lt;li id="group_id_14910" class="group_bucket"&gt;
                  &lt;img src="arrow_group_collapsed_true.png" class="arrow"&gt;
                  &lt;img src="blue_folder.png" class="folder"&gt;
                  Group 2
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Javascript (not much of it, I can show more if needed):</p>
  
  <pre><code>$( 'li.bucket' ).live( 'click',
      function()
      {
          // do stuff
      })
  </code></pre>
  
  <p>I want a click on "Groups" or "View All" to run the click function, but a click on "Group 1" or "Group 2" should not.</p>