function getSelectedCopyDates() {
var arr = new Array();
//for every row that has a checked checkbox
$("tr").has(".noteCheckBox:checked").each(function (i) {
if ($(this).id !== "checkAllNotes"){//since this doesn't have a "abbr=..." it breaks the code below "# syntax error"
//push the value of column(FName, LName) into the array
arr.push($("#" + this.id + "> td[abbr='EventDate'] > div").text());
}
});
return arr;
}
function getSelectedCopyDates() { var arr = new Array(); //for every row that has a
Share
If by “cell value” you’re just looking to get the text inside the
<td>then you could do something likethis:HTML:
jQuery:
You can use jQuery’s
.text()method to get the value within the given element.EDIT:
Saw you needed to get only the
<td>s where they contain checkboxes that are checked, so this may work for you:Find all the
td[abbr='FName, LName'that contain an input that is checked, then get the text of the that elements parent.EXAMPLE
UPDATED EXAMPLE
EDIT:
your function should be: