li.click does not work on dynamic created element
<p>i am creating new list elements dynamically. When clicking these elements I want execute code. 
The event <code>$("li").click()</code> only fires for my default list item <code>&lt;li&gt;I am a default list element&lt;/li&gt;</code> but not for any newly created ones. Please see my code below:</p>

<pre><code>&lt;script type="text/JavaScript"&gt;
$(document).ready(function() {
    console.log('document.ready callback');

    $("input#input2").click( function() {
        console.log('input#input2.click: ' + $("input#input1").val() + ' added to list');
        $("ul").append('&lt;li&gt;'+$("input#input1").val()+'&lt;/li&gt;');
    });

    $("li").click( function() {
        console.log('li.click: ' +$(this).text());
    });

    // Info
    // .on('click', function()
    // .live('click', function()
    // did not solve this problem
});&lt;script&gt;&lt;html&gt;
&lt;body&gt;
    Enter some stuff: &lt;input type="text" id="input1" value="stuff"&gt;
    &lt;br&gt;
    &lt;input type="submit" id="input2" value="Submit stuff to List"&gt;
    &lt;p&gt;stuff list!&lt;/p&gt;
    &lt;ul&gt;
        &lt;li&gt;I am a default list element&lt;/li&gt;
    &lt;/ul&gt;
&lt;/body&gt;
</code></pre>

<p>
</p>

<p>I found a similar question <a href="http://stackoverflow.com/questions/6658752/jquery-click-event-doesnt-work-on-dynamically-generated-elements#_=_">here</a> but unfortunately that did not solve my current case.</p>

<p>thx y'all!!    </p>
