title: JQuery class selector vs id selector
body: <p>I have 
  7 different buttons that all perform the same javascript function on click. should i use class selector or id selector. </p>
  
  <pre><code>$("input.printing").on("click", function(event) {
       printPdf(event);
  });
  </code></pre>
  
  <p>or </p>
  
  <pre><code>   $("#package1Pdf").click(function(event) {
           printPdf(event);
     });
  $("#package2Pdf").click(function(event) {
           printPdf(event);
     });
  $("#package3Pdf").click(function(event) {
           printPdf(event);
     });
  $("#package4Pdf").click(function(event) {
           printPdf(event);
     });
  </code></pre>
  
  <p>What are the advantage and disadvantage of each? Which is more preferred. </p>