title: How can I highlight a selected list item with jquery?
body: <p>I have several items in a list and want to highlight the one a user clicks on by applying some css style, maybe a background color etc.</p>
  
  <p>My HTML looks like this:</p>
  
  <pre><code>&lt;ul class="thumbnails"&gt;
      &lt;li&gt;
          &lt;a href="#" class="thumbnail"&gt;
              &lt;img class="giftthumb" src='thumb1.jpg' alt=""&gt;
              &lt;span class="gifttitle"&gt;Thumb1&lt;/span&gt;
          &lt;/a&gt;    
      &lt;/li&gt;
      &lt;li&gt;
          &lt;a href="#" class="thumbnail"&gt;
              &lt;img class="giftthumb" src='thumb2.jpg' alt=""&gt;
              &lt;span class="gifttitle"&gt;Thumb3&lt;/span&gt;
          &lt;/a&gt;    
      &lt;/li&gt;
      &lt;li&gt;
          &lt;a href="#" class="thumbnail"&gt;
              &lt;img class="giftthumb" src='thumb3.jpg' alt=""&gt;
              &lt;span class="gifttitle"&gt;Thumb3&lt;/span&gt;
          &lt;/a&gt;    
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>jQUery to retrieve selected item:</p>
  
  <pre><code>$('.thumbnail').click(function(e) {
      e.preventDefault();
  
      ???
  
  })
  </code></pre>