title: JQuery div isn't hidden when 'close' is clicked
body: <p>I have (what I'm sure is) a beginner question about JQuery.</p>
  
  <p>I'm trying to make a div popup when an image is clicked. (There are multiple instances of this on one page, btw.)</p>
  
  <p>However, the div doesn't close when 'close' is clicked. </p>
  
  <p>Here's the JQuery...</p>
  
  <pre><code>$(document).ready(function() {
  // Set up bubble CSS when page is loaded so bubble info is hidden unless user acts.
  // If JavaScript is turned off bubble info displays normally.
  //
  //
  
    $('.bubble_wrapper').css('position', 'relative');
    $('.bubble_info').css({
      position: 'absolute',
      display: 'none'
    });
    $('.bubble_close').css('display', 'block');
  });
  
  $(function() {
    var counter = 1;
    $('.bubble_wrapper').each(function() {
      var trigger = $('#bubble_trigger'+counter, this);
      var popup = $('#bubble_info'+counter, this);
  
      $([trigger.get(0), popup.get(0)]).click(function() {
        $('.bubble_info').css('display', 'none');
        popup.css('display', 'block');
      });
  
      $('.bubble_close').click(function() {
        $('.bubble_info').css('display', 'none');
      });
  
      counter += 1;
    });
  }); 
  </code></pre>
  
  <p>And here's the html (I'm working in Rails, btw)...</p>
  
  <pre><code>&lt;section id="latest_articles"&gt;
    &lt;ul&gt;
      &lt;% id_counter = 1 %&gt;
      &lt;% @articles.each do |article| %&gt;
        &lt;li class="bubble_wrapper"&gt;
          &lt;%= image_tag(article.image_url(:thumb), :class =&gt; "bubble_trigger", :id =&gt; "bubble_trigger"+id_counter.to_s) if article.image? %&gt;
          &lt;div class="bubble_info" id=&lt;%= "bubble_info"+id_counter.to_s %&gt; &gt;
            &lt;h1&gt;&lt;%= link_to article.title, article %&gt;&lt;/h1&gt;
            &lt;p&gt;&lt;%= article.description %&gt;&lt;/p&gt;
            &lt;a class="bubble_close"&gt;Close&lt;/a&gt;
          &lt;/div&gt;
        &lt;/li&gt;
        &lt;% id_counter += 1 %&gt;
      &lt;% end %&gt;
    &lt;/ul&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>Thanks in advance!</p>