How do I select a child element by ID with jQuery?
<p>I'm having trouble selecting the text inside a span element that resides in another container. </p>

<p>The situation I'm trying to solve is on the page we might have 10-15 different addresses at a time (so I'm appending a record Id onto the div's ID when the page is created). I need to be able to select a specific one by an ID, and then find the individual address pieces inside it.</p>

<p>An example of the HTML Output would be as follows:</p>

<pre><code>&lt;div id="Address_1"&gt;
    &lt;span id="Address"&gt;Some Address&lt;/span&gt;
    &lt;span id="City"&gt;Some City&lt;/span&gt;
    &lt;span id="State"&gt;Some State&lt;/span&gt;
    &lt;span id="Zip"&gt;Some Zip&lt;/span&gt;
&lt;/div&gt;

&lt;div id="Address_2"&gt;
    &lt;span id="Address"&gt;Some Address&lt;/span&gt;
    &lt;span id="City"&gt;Some City&lt;/span&gt;
    &lt;span id="State"&gt;Some State&lt;/span&gt;
    &lt;span id="Zip"&gt;Some Zip&lt;/span&gt;
&lt;/div&gt;
</code></pre>

<p>I've tried using the following (and many, many variations): </p>

<pre><code>$("#Address_" + Id).children().find("#Address").text;
$("#Address_" + Id).find("span#Address").text;
$("#Address_" + Id).find("span").find("#Address").text;
</code></pre>

<p>(I also can use a class inside the spans instead of a ID, but I'd like to know how to do it by ID as well.)</p>

<p>I'm sure it's something very simple that I'm doing incorrectly but I can seem to figure it out. I've searched a lot of questions on here as well looking for a similar one but I can't seem to find what I'm looking for. I apologize in advance if I simply didn't search using the right phrasing.</p>

<p>Any and all help is very much appreciated. </p>

<p>UPDATE: Here is my solution, thanks to the help of Ken Redler.</p>

<pre><code>&lt;div id="Address_1"&gt;
    &lt;span class="Address"&gt;Some Address&lt;/span&gt;
    &lt;span class="City"&gt;Some City&lt;/span&gt;
    &lt;span class="State"&gt;Some State&lt;/span&gt;
    &lt;span class="Zip"&gt;Some Zip&lt;/span&gt;
&lt;/div&gt;

$("#Address_" + Id).find("span.Address").text();
</code></pre>
