title: jquery: How to target a class name stored in a variable
body: <p>I am trying to find out the class name from a check box on click and use that to get all checkbox id's for that class. </p>
  
  <pre><code>$('input:checkbox').change(function(){
      var $checkbox_class=$(this).attr('class');
      var check_list = $("'.'+checkbox_class:checked").map(function() {
          return $(this).attr('id');
      }).get().join('|')
      alert(check_list);
  }
  if (check_list = "") 
      var check_list="none-selected";
  </code></pre>
  
  <p>How do I target a class name stored in a variable ?</p>