I want to get the value of an id from a nested div - jquery
<p>I want to obtain the .text() of #inner2</p>

<pre><code>&lt;div class="outer" id="outer"&gt;

&lt;div id="inner1" class="inner"&gt;test1&lt;/div&gt;
&lt;div id="inner2" class="inner"&gt;test2&lt;/div&gt;
&lt;div id="inner3" class="inner"&gt;test3&lt;/div&gt;


&lt;/div&gt;
</code></pre>

<p>This is the jquery function I am using</p>

<pre><code>$('.outer').bind('click',function() {


var one = $('#inner'+x).attr('id');
alert(one);


});
</code></pre>

<p>The problem is the first #id value is show in the alert.</p>

<p>Thanks</p>

<p>Jean</p>
