title: Accessing features from checkboxes that are inside Leaflet popup
body: <p>I'm working in leaflet, and I'm drawing a polygon with the  <a href="https://github.com/codeofsumit/leaflet.pm" rel="nofollow noreferrer">Leaflet PM plugin</a></p>
  
  <p>On I finish the drawing I run the following event</p>
  
  <pre><code>mymap.on('pm:create', function(e) {
      var strPopup = '&lt;input type="checkbox" id="cbx1" class="cbx" name="objects" value="eraser"&gt;';
      strPopup += '&lt;input type="checkbox" id="cbx2" class="cbx" name="objects" value="pencil"&gt;';
      strPopup += '&lt;button id="btnSave" class="btn" onclick="foundObjects()" &gt;Save&lt;/button&gt;';
      e.layer.bindPopup(strPopup);
      e.layer.openPopup();
  }
  </code></pre>
  
  <p>So, when the user clicks the 'Save' button, I'm trying to read the values of the checkboxes with jQuery:</p>
  
  <pre><code>function foundObjects(){
      console.log( $('#cbx1').attr('checked'))
      console.log( $('#cbx2').attr('value'))
  }
  </code></pre>
  
  <p>However both results appears in Console as 'undefined'. Someone has a hint, why is it happening?</p>