Have JSP page with dynamically generated HTML table with unknown number of rows.
Have property on backend, that sets maximum number of rows, e.g: max_rows=15
You can use the slice function:
$('table tbody > tr').slice(1,5).hide();