JQuery - How to put new element around a new generated element
<p>My script generates a new input field and I want to put a 'span' element around it. But I can't figure out, how to do that.</p>

<pre><code> .append($('&lt;a&gt;').html('+') 
            .attr('href', '#')
            .click(function(){
                ($(this)
                    .after($('&lt;a&gt;').text('X')
                        .attr('href', '#')
                        .click(function(){
                            $(this).parent().remove();
                            return false;   })
                    ) 
                    .after($('&lt;input&gt;') // NEED A SPAN AROUND THIS ELEMENT
                        .attr('type', 'text')
                        .attr("name","avz_anzahl["+avz_array+"][]")
                        .attr("size","3")
                        .attr("style","margin-left:10px; margin-top:5px;")
                        .attr("id","anzahl_feld")
                        .attr("onblur","anzahl_vali();")
                        .attr("value", "")
                    ) 

                    .after('&lt;br/&gt;')).append ;
                return false;   })
    )
</code></pre>
