Set size for Input item using JQuery
<p>There is the following code:</p>

<pre><code>$(".translated").mouseenter(function(){
    if ($(this).hasClass("editable")){
        return;
    }
    var h=$(this).height();
    var w=$(this).width();
    $(this).empty();
    $("&lt;input/&gt;", {
        type: "text",
        height:h,
        width:w,
        value:$(this).text()
        }).appendTo(this);
    $(this).height(h);
    $(this).width(w);
    $(this).addClass("editable");
});
</code></pre>

<p>This code removes text from a <code>&lt;div&gt;</code> container and inserts an <code>&lt;input&gt;</code> item into it. But there is the problem: the new <code>&lt;input&gt;</code> item has height larger than the <code>&lt;div&gt;</code> container despite the values of the <code>h</code> and <code>w</code>. How can I fix it?  </p>
