jquery on the fly new element
<p>Once a user click on a button it creates new input text on the fly. </p>

<p>Lets assume those 2 input are created on the fly.</p>

<pre><code>&lt;input id="txtImageSource_1" type="text"&gt;
&lt;input id="txtImageSource_2" type="text"&gt;
</code></pre>

<p>Now to simplify my problem.  I need to show the id of the input when they enter text inside it.  Again those 2 elements have been created on the fly.</p>

<p>I tried the following but don't work.</p>

<pre><code>    $('#' + $(this).attr('id')).live('keyup', function(){alert($(this).attr('id')));
                });
</code></pre>

<p>Creating the text box</p>

<pre><code>$("#add_image").click(function() { 
var i = ($('p.fields').length);
        $('&lt;p class="fields" id="field_' + i + '"&gt;&lt;input type="text" id="txtImageSource_' + i + '"/&gt;"&lt;input type="button" value="Delete" class="btnDelete" id="' + i + '"&gt;&lt;/p&gt;').appendTo('#formelement');
  });   
</code></pre>
