Insert element into div with jQuery, append not working
<p>I have the following code:</p>

<pre><code>$('input[id$="txtTecnicas"]').bind('keypress', function (e) {
            //if user presses enter
            if (e.keyCode == 13) {
                //cancel asp.net postback
                e.preventDefault();

                //if value of textbox is not empty
                if ($(this).val() != "") {

                    //Save value into valueTec
                    var valueTec = $(this).val();
                    //Clear textbox value
                    $(this).val("");
                    //Create tag div to insert into div
                    var texthtml = '&lt;span class="tag" title="' + valueTec + '"&gt;' + valueTec + ' &lt;a&gt;x&lt;/a&gt;&lt;input type="hidden" value="1" name="tags"&gt;&lt;/span&gt;';

                    //Append the new div inside tecTagHolder div
                    $('[id$="tecTagHolder"]').append(texthtml);
                }
            }
        });
</code></pre>

<p>However, it is not inserting the code into tecTagHolder div, and since it need to insert into tecTagHolder many divs, one each time user press enter, I cannot use <code>.html()</code> command but with append it doesn't append even a "Hello" string! what could it be wrong? Thanks a lot!</p>
