I have a function that gets the all the li elements with the name "children-li" from a list "my_dynamic_list". each li element has three checkboxes of the names object_ck_bx, write_ck_bx, view_ck_bx, I need to get the values of that checksboxes, but I get "children is not a function", why the code can access to li tag name but can not access li children?
function getTreeData() {
// Get All Li elements thats contains the checkboxes form the type object,read,write
var children = $('#my_dynamic_list').children().find('li[name=children-li]');
var extracted_data = [];
for (i = 0; i < children.length ; i++) {
alert(children[i].tagName); //this gives li
if (children[i].children().find('input[name=object_ck_bx]').checked == true) { // This Line gives Uncaught TypeError: children[i].children is not a function
var profile_code = children[i].children().find('input[name=object_ck_bx]').id;
var view = children[i].children().find('input[name=view_ck_bx]').checked;
var write = children[i].children().find('input[name=write_ck_bx]').checked;
alert('profile_code' + profile_code);
var item = [];
item = { Id: profile_code, read: view, write: write };
extracted_data.push(item);
}
}
// alert(extracted_data);
return extracted_data;
}

