title: Do looping through items and adding handlers to it hurt performance
body: <p>Does it hurt in performance when I loop through list-items and add a click-handler to all separate items?</p>
  
  <p>The reason I do this is because I would only like to make the list item clickable if it contains an hyperlink.</p>
  
  <p>The code I'm currently using is:</p>
  
  <pre><code>$('ul.paginator li').each(function() {
    if ($('a', this).length &gt; 0) {
      $(this).css('cursor', 'pointer');
      $(this).click(function() {
        location.href = $('a', this).attr('href');
      });
    }
  });
  </code></pre>