title: Multiple buttons with the same #id to do the same function?
body: <p>JS beginner, sorry </p>
  
  <p>How can could I make it so that every button that has the id "#popit" to open the same popup box?</p>
  
  <p>I'm using <a href="http://dinbror.dk/blog/bPopup/" rel="nofollow">bPopup</a></p>
  
  <p>With this code there is only one button on the site which does open the popup</p>
  
  <pre><code>;(function($) {
      $(function() {
          $('#my-button').bind('click', function(e) {
              e.preventDefault();
              $('#element_to_pop_up').bPopup();
          });
      });
  })(jQuery);
  </code></pre>
  
  <p><a href="http://jsfiddle.net/yg5so25s/" rel="nofollow">http://jsfiddle.net/yg5so25s/</a> - there are 3 buttons with the same id, but only the first one opens the popup box, anyway I could make it so that every single button to open the same popupbox?</p>