how to determine the exact element type/code segment, in real world scenarios of radio buttons
<p>I have a scenario where I want to parse through all the values displayed on screen for a radio button.</p>

<p>Now the radio button can be any one of the following, in coding style--</p>

<pre><code>&lt;input type="radio" name="lunch" value="pasta1" /&gt;&lt;span&gt;Pasta&lt;/span&gt;
</code></pre>

<p>OR</p>

<pre><code>&lt;input type="radio" name="lunch" value="pasta1" /&gt;&lt;p&gt;Pasta&lt;/p&gt;
</code></pre>

<p>OR </p>

<pre><code>&lt;input type="radio" name="lunch" value="pasta1" /&gt;&lt;ul&gt;Pasta&lt;/ul&gt;
</code></pre>

<p>OR  <code>&lt;input type="radio" name="lunch" value="pasta1" /&gt;Pasta</code></p>

<p>Basically I have to deal with any type of real world HTML... While I can get the factual value (="pasta1" for this example) using val(), I want to obtain the text "Pasta" also as shown above, irrespective of whatever tags may be used, in any combination... Is it possible to get such data? At the very least, is it possible to get  (for our examples above) the element pointing to <code>&lt;p&gt;Pasta&lt;/p&gt;</code> or <code>&lt;ul&gt;Pasta&lt;/ul&gt;</code> and so on? Then I can try and extract the exact text from that element/node...I can use pure javascript or jquery...</p>
