how to delete specific number of rows using jquery provided by argument
<p>i have a sample code. This will delete entire row if nor args provided. If provided it will delete the given rows.</p>

<pre><code>function deleteTableRows(tableID)
{
        rowsToDel = document.getElementById('getrows').value;
        if(document.getElementById(tableID) !== undefined)
        {
                var tbl = document.getElementById(tableID);
                var deleteAll = false;
                if(rowsToDel ==null || rowsToDel == "")
                {
                        rowsToDel = tbl.rows.length;
                        deleteAll = true;
                }
                if(deleteAll)
                {
                        while(rowsToDel &gt; 0)
                        {
                                tbl.deleteRow(rowsToDel - 1);
                                rowsToDel = tbl.rows.length;
                        }
                }
                else
                {
                        while(rowsToDel &gt; 0)
                        {
                                tbl.deleteRow(rowsToDel - 1);
                                rowsToDel = rowsToDel - 1;
                        }
                }
        }
}
</code></pre>

<p>How to do this in jquery      </p>
