jquery .on() not finding click
<p>I have the following code which looks like this:</p>

<pre><code>&lt;div id="container"&gt;
// 3 lines other code here
&lt;a hef="#" id="agreelink"&gt;&lt;input id="agree" name="agree" value="Agree" style="position:relataive;border-style:none" /&gt;&lt;/a&gt;
&lt;input id="disagree" name="disagree" value="Disagree" style="position:relataive;border-style:none" /&gt;
&lt;input id="abstain" name="abstain" value="Abstain" style="position:relataive;border-style:none" /&gt;
// 2 more lines here
&lt;/div&gt;
</code></pre>

<p>I then have a function where i was using <code>.live()</code> as the elements are dynamic and it kept duplicating the fire, and I need to move to <code>.on()</code>.  So my function code I have tried to fire any of those buttons are as follows:</p>

<pre><code>&lt;$('#container').on('click', 'input', function() {
alert($(this).attr('name'));
});
</code></pre>

<p>and
    

<pre><code>&lt;$('#container').on('click', '#agree', function() {
alert($(this).attr('name'));
});
</code></pre>

<p>and</p>

<pre><code>&lt;$('#container').on('click', 'a', function() {
alert($(this).attr('id'));
});
</code></pre>

<p>But i cannot make it fire, I have searched online and tried and tested it, but I am sure I am not doing something right, just not sure what it is.  Can anyone suggest where i am going wrong ?</p>

<p>Thanks </p>
