Fadein a jQuery wrap if input value >1
<p>I have an input with an X (clear) button to clear the value. I want that button to fadein if there is a value in the input. </p>

<p>Here is a fiddle of what I have: <a href="http://jsfiddle.net/3m25K/" rel="nofollow">http://jsfiddle.net/3m25K/</a></p>

<pre><code>&lt;input class="inputfield"&gt;
</code></pre>



<pre><code>$('input.inputfield').wrap('&lt;span class="deleteicon" /&gt;').after($('&lt;span/&gt;').click(function() {

    $('.inputfield').val('').focus();
}));
</code></pre>



<pre><code>input{
    font-size:22px;}
span.deleteicon {
    position: relative;
}
span.deleteicon span {
    position: absolute;
    display: block;
    top: -5px;
    right: 7px;
    width: 24px;
    height: 24px;
    background:black;
    cursor: pointer;
}
</code></pre>
