May 9, 2013
how to know whether check box is checked or not
Veena’s Questions:
$('[name="SelectHighlights"]:checked').each(function () {
var row = $(this).closest('tr');
var high = {
AccountId: row.find('td:nth-child(3)').text(),
Highcomments: row.find('td:nth-child(4)> input').val()
};
HighlightsArea.push(high);
});
this is my code for retreiving the rows with checkbox checked
how to retreive the rows where check box is not checked
Please help me
Thanks in advance
Use :not() selector
$('[name="SelectHighlights"]:not(:checked)').each(function () {
var row = $(this).closest('tr');
var high = {
AccountId: row.find('td:nth-child(3)').text(),
Highcomments: row.find('td:nth-child(4)> input').val()
};
HighlightsArea.push(high);
});