title: Get text from label using jQuery
body: <p><strong>Code</strong></p>
  
  <pre><code>var $eContainer = $('&lt;div/&gt;', { id: "eContainer", class: 'eList' }).appendTo($injectTo);
      for (var i in navProps) {
          var np = navProps[i];
          var npName = np.name;
          var npId = containerId + "_" + npName;
  
          var $eLabel = $('&lt;label /&gt;', { 'for': npId, text: npName }).appendTo($eContainer);
          $('&lt;input /&gt;', { type: 'checkbox', id: npId, value: npName }).prependTo($eLabel);
      };
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <pre><code>&lt;label for="e_22"&gt;
      &lt;input type="checkbox" id="selectcolumn_16" value="22"&gt;Supplier&lt;div id="eContainer" class="eList"&gt;
              &lt;label for="a"&gt;
                  &lt;input type="checkbox" id="a" value="A"&gt;AAA&lt;/label&gt;
                  &lt;label for="b"&gt;
                      &lt;input type="checkbox" id="b" value="B"&gt;BBB&lt;/label&gt;
                                      &lt;/div&gt;
                                  &lt;/label&gt;
  </code></pre>
  
  <p><strong>Problems</strong></p>
  
  <ul>
  <li><strike>it's not closing input tag</strike></li>
  <li>when I try to get text of label it is returning all child label text as well</li>
  </ul>
  
  <p><strong>Code for 2nd problem</strong></p>
  
  <pre><code>// Event handler for adding labels.
  this.$eList.on('click', ':input', $.proxy(function (event) {
      var $e = $(event.target);
      var selectedLabel = $e.parent().text();
      // here it should return "Supplier" when I click on it, but it returns
      // SupplierAAABBB -- which is WRONG
  </code></pre>
  
  <p><strong>Edit</strong></p>
  
  <p>Please don't provide solution with hard code, as I need to make it work dynamically, so it must need to get it from parent, there will several hierarchies of these div's and controls </p>