I need to grab the text value of a child div.
A
B>
-
you can simply:
var text_val = $('#second_child').text();
as pointed by previous answers. but, since you "need to grab the text value of a child div", i assume that the child div id probably not always available. you can try this instead:
var text_val = $('#first').children().eq(1).text();
where 1 is the index of the child div (since it count starts from zero)