jQuery adding <li> Item and click Events
<p>Very new to jQuery, if dupe question sorry at this point not even sure I am using correct verbiage.</p>

<p>I need to add a li item to a ul based on a click event of a ListBox (user selects text and a new li is added with the selected text). And I need to add a icon, label and input on the li item. The icon needs to be a 'remove' icon.</p>

<p>How can I wire up the function to remove the newly added li item via jQuery? </p>

<p>Here is what I have tried;</p>

<pre><code>        $(function() {
        function addSelectedWordCriteria() {
            var selectedWord = $("#wsWords").val();
            $("#wsCriteriaList").append("&lt;li&gt;&lt;a href='#' class='wsCriteriaRemove'&gt;&lt;span class='ui-icon ui-icon-circle-close'/&gt;&lt;/a&gt;&lt;em class='wsFilteredWord'&gt;" + selectedWord + "&lt;/em&gt;&lt;input type='textbox' maxlength='200' class='wsFilteredWords'/&gt;&lt;/li&gt;");
            $("#wsCriteriaList a:last").bind("click", "removeSelectedWordCriteria");
        };

        function removeSelectedWordCriteria() {
            $("#wsCriteriaList").selected().remove();
        }

    })

&lt;%= Html.ListBox("wsWords", ViewData["Words"] as IEnumerable&lt;SelectListItem&gt;) %&gt;    

&lt;ul id="wsCriteriaList"&gt;    
&lt;/ul&gt;
</code></pre>

<p>Thanks for any suggestions.</p>
