title: jQuery - why can't I bind events to elements in a loop?
body: <p>Here is my code:</p>
  
  <pre><code>  var b = $(slipStream.conf.mainVis).find('p#prev');
    b.click(function() {
      slipStream.slideLeft();
          return false;
    });
  
    b = $(slipStream.conf.mainVis).find('p#next');
    b.click(function() {
      slipStream.slideRight();
          return false;
    });
  
    b = $(slipStream.conf.controls).find('li img');
    console.log(b);
    for (var l in b) {
          l.click(function() {
                var visIndex = l.index();
                console.log(visIndex);
          });
    };
  </code></pre>
  
  <p>The first two bindings go through, no problem. But I can't loop through a collection and bind something to each member? (the console is telling me that "l.click is not a function.") Is this a limitation of jQuery or is my code off? This seems like it would be the way to do it, though...</p>