title: Getting checkbox value and show them
body: <p>I want to show value from checkbox checked items.
  Here is my js. in console getting undefined. How to solve this.</p>
  
  <p><a href="http://jsfiddle.net/bmtx4ykc/" rel="nofollow">http://jsfiddle.net/bmtx4ykc/</a></p>
  
  <pre><code>$(document).ready(function() {
    $("#checkAll").change(function() {
      $("input:checkbox").prop('checked', $(this).prop("checked"));
    });
    $('#submitButton').click(function() {
      var values = $("#add input[name=chkboxName]:checked").map(function() {
        row = $(this).closest("tr");
        return {
          id: $(this).val(),
          name: $(row).find("#name").text(),
          quantity: $(row).find("#quantity").text()
        }
      }).get();
      $('#result').append(values.name);
      console.log(values.name);
    });
  });
  </code></pre>