Problem in adding input with similar class
<p>I have a problem adding an input with similar class(<code>addinput_units</code>). </p>

<p>In the <a href="http://jsfiddle.net/FpsPh/" rel="nofollow">example</a> when you click on the "add" link next to "field 1", it adds a new input following "field 2" with value "field 1". </p>

<p>How can I add a new field following the input nearest to the "add" link with a similar class(<code>addinput_units</code>) in HTML?</p>

<p><strong>EXAMPLE:</strong> <a href="http://jsfiddle.net/FpsPh/" rel="nofollow">http://jsfiddle.net/FpsPh/</a></p>

<pre><code>$(function () {
    $('a.add_input').live('click', function (event) {
        event.preventDefault();
        var $class = '.' + $(this).closest('div.find_input').find('div').attr('class').split(" ")[0];
        var newDiv = $($(this).closest($class).get(0)).clone(false);
        $(this).closest($class).find('.add_input:first').remove()
        newDiv.hide().fadeIn('slow');
        $($class + ':last').after(newDiv);
    });
});
</code></pre>

<p><strong>EDITE:</strong></p>

<p>this is the original my code that not work true. see you: <a href="http://jsfiddle.net/FpsPh/4/" rel="nofollow">http://jsfiddle.net/FpsPh/4/</a></p>
