Thursday, May 14, 2015

Get all asp net listview items in array

var rows = [];
$('#<%: lvStudents.ClientID %>_itemPlaceholderContainer tr:gt(1)').each(function (i, v) {
    var row = $(this);
    rows.push(row);
});
if InsertItemPosition="LastItem"
gt(1)
else if InsertItemPosition="FirstItem" 
gt(2)

Skip first N elements in JQuery

jQuery has a gt selector. (Greater than).
$('#test > div:gt(1)');
Or you can use the slice function
$('#test > div').slice(2);