Ajax search system expand - clone by click

by Akram kamal

HTML

<table>
    <tr class="products">
        <td>
            <div class="form">
                <input id="search-box" name="Produkt" placeholder="Suche" type="text" required/>
            </div>
            <td>
    </tr>
    <tr>
        <td></td>
        <td>
            <button id="clone-search" type="button">Ein weiteres Produkt hinzufĂĽgen.</button>
        </td>
    </tr>
</table>

JavaScript

$(document).ready(function () {
    $('#clone-search').click(function () {
        $('.products:last').clone().insertAfter(".products:last").find(":input").val("");
    });
});