title: Leaflet: Extending custom control with Grouped Layers Control plugin
body: <p>I am using a Leaflet plugin called <a href="https://github.com/ismyrnow/Leaflet.groupedlayercontrol" rel="nofollow">Leaflet.groupedlayercontrol</a> and trying to figure out how to place this groupedlayercontrol plugin in an HTML div so I can better manage it. Code below and <a href="http://plnkr.co/edit/OqfFLtCdc8q5TaIER9ka?p=preview" rel="nofollow">PLNKR here</a>.</p>
  
  <p>My hypothetical overlays object looks like this:</p>
  
  <pre><code>var map = new L.Map('mapbox', {
  'center': [39.76185, -104.881105],
  'zoom': 9,
  'layers': [
      L.tileLayer('//{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
          attribution: 'text here'
      })
  ]});
  
  var pizza = L.marker([39.8443948439646, -104.97711181640625]).addTo(map);
  var hamburger = L.marker([39.97291055131899, -105.08697509765625]).addTo(map);
  var pie = L.marker([40.111688665595956, -104.776611328125]).addTo(map);
  
  var overlaysOptions = {
        groupCheckboxes: true,
        collapsed: false,
        position: 'topright'
  };
  
  var overlays = {
    "Category One":{
      "Pizza": pizza,
      "Hamburger": hamburger
    },
    "Category Two": {
      "Pie": pie
    }
  };
  
  
  L.Control.Overlays = L.Control.extend({
  
  onAdd: function (map) {
      var container = L.DomUtil.create('div', 'control-overlays');
          container.innerHTML = L.DomUtil.create('&lt;div class="panel panel-default"&gt;&lt;div class="panel-heading" id="headingOne"&gt;&lt;h4 class="panel-title"&gt;&lt;a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne"&gt;Heading Title&lt;/a&gt;&lt;/h4&gt;&lt;/div&gt;&lt;div id="collapseOne" class="panel-collapse collapse in"&gt;&lt;div class="panel-body"&gt;Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;', container);
  
      return container;
  },
  
  });
  
  //L.control.groupedLayers(null, overlays, overlaysOptions).addTo(map);
  var controlOverlays = new L.Control.Overlays(overlays, overlaysOptions).addTo(map);
  </code></pre>
  
  <p>Anyone know how to get the groupledlayers plugin inside the HTML div so I can work with it? Thanks!</p>