accessing id of a label's "for" attribute
<p>I have a JSF application that produces a page with a label on it:</p>

<pre><code>&lt;label for="_idJsp0:question" class="left"&gt;Question&lt;/label&gt;
</code></pre>

<p>And then elsewhere in the DOM is the component:</p>

<pre><code>&lt;td&gt;&lt;textarea rows="7" cols="25" id="_idJsp0:question" name="_idJsp0:question"&gt;My Question.&lt;/textarea&gt;&lt;/td&gt;
</code></pre>

<p>For Selenium, I am building a custom location strategy using jQuery, and so my question is how do return the ID of the label's "for" attribute?  I can use .attr("for") on the label to return the string of the ID but I am missing how to actually return properly formatted selector output.  I've tried approaches like:</p>

<pre><code>var inner = "label:contains('Question')";
$('#' + $(document).find(inner).attr('for'));
</code></pre>

<p>Any help would be appreciated!</p>
