title: Retrieve input from specific div
body: <p>I currently have multiple dialogs, but I would like to keep the element 'name' just as they are so that I can handle it in one function.</p>
  
  <p>Code:</p>
  
  <pre><code>    &lt;div class="hiddenInViewSource" id="dialog-properties-section" title="Control Properties"&gt;
          &lt;div id="tabs-section"&gt;
              &lt;ul&gt;
                  &lt;li&gt;&lt;a href="#tabs-section-basic"&gt;Basic&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
              &lt;div id="tabs-section-basic"&gt;
                  Section Caption &lt;br/&gt;&lt;input type="text" name="label" /&gt;&lt;br/&gt;
                  Section Introduction &lt;br/&gt;&lt;input type="text" name="additionalLabel" /&gt;&lt;br/&gt;&lt;br/&gt;
  
                  &lt;br/&gt;&lt;br/&gt;
  
                  &lt;button&gt;Save&lt;/button&gt;
                  &lt;button&gt;Cancel&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="hiddenInViewSource" id="dialog-properties-simple" title="Control Properties"&gt;
          &lt;div id="tabs-simple"&gt;
              &lt;ul&gt;
                  &lt;li&gt;&lt;a href="#tabs-simple-basic"&gt;Basic&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
              &lt;div id="tabs-simple-basic"&gt;
                  simple Caption &lt;br/&gt;&lt;input type="text" name="label" /&gt;&lt;br/&gt;
  
                  &lt;br/&gt;&lt;br/&gt;
  
                  &lt;button&gt;Save&lt;/button&gt;
                  &lt;button&gt;Cancel&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Now I retrieve the values of the label for example with: </p>
  
  <pre><code> $('[name=label]').val();
  </code></pre>
  
  <p>But of course, now it does not know from which div it should get it and it returns empty. (as only 1 is filled and it will get the wrong one.)</p>
  
  <p>My question:</p>
  
  <p>How can I retrieve the value from the input from the correct div using the selector?</p>